Skip to content

Commit 28af95b

Browse files
authored
Fix short ids using long ids and vice-versa
2 parents 217d5ce + 01eba8c commit 28af95b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

textractor/utils/html_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ def add_id_to_html_tag(prefix, id, config):
55
if not isinstance(config, HTMLLinearizationConfig) or not prefix:
66
return prefix
77
if config.add_ids_to_html_tags:
8-
return prefix[:-1] + f' id="{id[:8]}"' + prefix[-1]
9-
elif config.add_short_ids_to_html_tags:
108
return prefix[:-1] + f' id="{id}"' + prefix[-1]
9+
elif config.add_short_ids_to_html_tags:
10+
return prefix[:-1] + f' id="{id[:8]}"' + prefix[-1]
1111
else:
1212
return prefix
1313

0 commit comments

Comments
 (0)