mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibGfx/TIFF: Support tag names with capitalized acronym
We now turn 'ICCProfile' into 'icc_profile' instead of 'i_c_c_profile'.
This commit is contained in:
parent
62f28d9968
commit
5622e7d77c
Notes:
sideshowbarker
2024-07-16 23:13:25 +09:00
Author: https://github.com/LucasChollet
Commit: 5622e7d77c
Pull-request: https://github.com/SerenityOS/serenity/pull/22083
Reviewed-by: https://github.com/nico ✅
1 changed files with 2 additions and 1 deletions
|
@ -144,7 +144,8 @@ def retrieve_biggest_type(types: List[TIFFType]) -> TIFFType:
|
|||
|
||||
|
||||
def pascal_case_to_snake_case(name: str) -> str:
|
||||
return re.sub(r'(?<!^)(?=[A-Z])', '_', name).lower()
|
||||
name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).lower()
|
||||
|
||||
|
||||
def generate_getter(tag: Tag) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue