From d39a236d2fffa704d8d9790e13beaac0e3c7fe3c Mon Sep 17 00:00:00 2001 From: Alvie Rahman Date: Fri, 19 Mar 2021 11:52:48 +0000 Subject: [PATCH] fix issue where otf macros aren't shown properly if they're not pluralized --- otfm-python | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/otfm-python b/otfm-python index 323689c..a59016b 100755 --- a/otfm-python +++ b/otfm-python @@ -139,7 +139,9 @@ def process(input, macros): value = token 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()]: value = pluralize(macros[token.lower()[:-1]])