markdowndata 0.0.3__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {markdowndata-0.0.3 → markdowndata-0.0.4}/PKG-INFO +1 -1
- {markdowndata-0.0.3 → markdowndata-0.0.4}/markdowndata/__init__.py +7 -3
- {markdowndata-0.0.3 → markdowndata-0.0.4}/markdowndata/process_markdown.py +1 -7
- {markdowndata-0.0.3 → markdowndata-0.0.4}/pyproject.toml +1 -1
- {markdowndata-0.0.3 → markdowndata-0.0.4}/LICENSE +0 -0
- {markdowndata-0.0.3 → markdowndata-0.0.4}/markdowndata/content_parser.py +0 -0
- {markdowndata-0.0.3 → markdowndata-0.0.4}/markdowndata/section_tree.py +0 -0
- {markdowndata-0.0.3 → markdowndata-0.0.4}/markdowndata/utils.py +0 -0
|
@@ -11,17 +11,11 @@ class MarkDataParser:
|
|
|
11
11
|
def __init__(self):
|
|
12
12
|
self.data = {}
|
|
13
13
|
|
|
14
|
-
def
|
|
14
|
+
def loads(self, text: str) -> dict:
|
|
15
15
|
"""
|
|
16
16
|
Loads markdown content from a file path or file-like object, parses it,
|
|
17
17
|
and builds a nested dictionary of structured data.
|
|
18
18
|
"""
|
|
19
|
-
if isinstance(file, str):
|
|
20
|
-
with open(file, 'r') as f:
|
|
21
|
-
text = f.read()
|
|
22
|
-
else:
|
|
23
|
-
text = file.read()
|
|
24
|
-
|
|
25
19
|
# Split the text into Section objects based on markdown headers
|
|
26
20
|
sections = split_sections(text)
|
|
27
21
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|