mirror of
https://github.com/alvierahman90/otfm-python.git
synced 2025-01-12 02:04:20 +00:00
fix issue where otf macros aren't shown properly if they're not pluralized
This commit is contained in:
parent
a3d80f5703
commit
d39a236d2f
@ -139,7 +139,9 @@ def process(input, macros):
|
|||||||
value = token
|
value = token
|
||||||
|
|
||||||
if token.lower() in macros.keys():
|
if token.lower() in macros.keys():
|
||||||
value = macros[token.lower()][0]
|
value = macros[token.lower()]
|
||||||
|
if isinstance(value, list):
|
||||||
|
value = value[0]
|
||||||
elif token.lower() in [f"{m}s" for m in macros.keys()]:
|
elif token.lower() in [f"{m}s" for m in macros.keys()]:
|
||||||
value = pluralize(macros[token.lower()[:-1]])
|
value = pluralize(macros[token.lower()[:-1]])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user