mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +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
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