diff --git a/meta_yaml.py b/meta_yaml.py index d1dfde7..2fb536f 100644 --- a/meta_yaml.py +++ b/meta_yaml.py @@ -96,14 +96,10 @@ class MetaYamlPreprocessor(Preprocessor): lines.insert(0, line) if yaml_block: meta = yaml.load("\n".join(yaml_block), Loader) - # case-insensitize meta data keys: - meta = { - k.lower(): meta[k] for k in meta - } - # PyMarkdown's Meta compat: ensure everything's a list - meta = { - k: v if isinstance(v, list) else [v] for k, v in meta.items() - } + + # Compat with PyMarkdown's meta: Keys are lowercase, values are lists + meta = {k.lower(): v if isinstance(v, list) else [v] for k, v in meta.items()} + self.markdown.Meta = meta return lines