Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Fix multiple prefix issue #69

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ __pycache__/
# C extensions
*.so

# pyright config
pyrightconfig.json

# Distribution / packaging
.Python
build/
Expand Down
3 changes: 2 additions & 1 deletion sdRDM/markdown/markdownparser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from io import StringIO
import re
from collections import ChainMap

import frontmatter
from typing import List, Tuple, Dict, IO
Expand Down Expand Up @@ -35,7 +36,7 @@ def parse(cls, handle: IO):
metadata = frontmatter.load(StringIO(content))
parser.namespaces = metadata.get("nsmap", {}) # type: ignore
parser.add_id_field = metadata.get("id-field", True) # type: ignore
parser.prefixes = metadata.get("prefixes", {}) # type: ignore
parser.prefixes = dict(ChainMap(*metadata.get("prefixes", {}))) # type: ignore

doc = MarkdownIt().parse(parser._remove_header(content))
modules, enumerations = parser.get_objects_and_enumerations(doc)
Expand Down