mirror of
https://github.com/TrentSPalmer/hugo_themes_report.git
synced 2024-12-04 16:41:31 -08:00
add \n after regex substitution that adds quotes after double-dotted
version numbers because toml module doesn't handle double-dotted version numbers that aren't quoted
This commit is contained in:
parent
467bc4356a
commit
6965a1bae9
@ -432,8 +432,9 @@ def update_tags_list_for_each_hugo_themes():
|
||||
if theme.themes_toml_content != None:
|
||||
content = b64decode(theme.themes_toml_content).decode('utf-8')
|
||||
# put quotes around any unquoted double-dotted version numbers
|
||||
# (and add a newline afterwards)
|
||||
# because python toml libraries will error out on those
|
||||
theme_toml = toml.loads(match.sub(r'"\1"',content))
|
||||
theme_toml = toml.loads(match.sub(r'"\1"\n',content))
|
||||
if 'tags' in theme_toml:
|
||||
if len(theme_toml['tags']) > 0:
|
||||
theme_tags = [tag.lower() for tag in theme_toml['tags'] if len(tag) > 0]
|
||||
|
Loading…
Reference in New Issue
Block a user