markdown-analysis 0.1.1__tar.gz → 0.1.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/PKG-INFO +1 -1
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/markdown_analysis.egg-info/PKG-INFO +1 -1
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/mrkdwn_analysis/markdown_analyzer.py +9 -4
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/setup.py +1 -1
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/LICENSE +0 -0
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/README.md +0 -0
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/markdown_analysis.egg-info/SOURCES.txt +0 -0
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/markdown_analysis.egg-info/dependency_links.txt +0 -0
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/markdown_analysis.egg-info/requires.txt +0 -0
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/markdown_analysis.egg-info/top_level.txt +0 -0
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/mrkdwn_analysis/__init__.py +0 -0
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/setup.cfg +0 -0
- {markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/test/__init__.py +0 -0
@@ -284,19 +284,24 @@ class MarkdownParser:
|
|
284
284
|
self.pos = self.length
|
285
285
|
|
286
286
|
def parse_fenced_code_block(self, lang):
|
287
|
+
initial_line = self.pos
|
288
|
+
initial_indent = len(self.lines[self.pos]) - len(self.lines[self.pos].lstrip())
|
289
|
+
fence_marker = self.lines[self.pos].strip()[:3] # Get ``` or ~~~
|
287
290
|
self.pos += 1
|
288
291
|
start = self.pos
|
292
|
+
|
289
293
|
while self.pos < self.length:
|
290
294
|
line = self.lines[self.pos]
|
291
|
-
if line.strip()
|
295
|
+
if line.strip() == fence_marker:
|
292
296
|
content = "\n".join(self.lines[start:self.pos])
|
293
297
|
self.tokens.append(BlockToken('code', content=content, meta={"language": lang}, line=start+1))
|
294
298
|
self.pos += 1
|
295
299
|
return
|
296
300
|
self.pos += 1
|
297
|
-
|
298
|
-
|
299
|
-
self.pos =
|
301
|
+
|
302
|
+
# If we reach here, we didn't find the closing fence
|
303
|
+
self.pos = initial_line # Reset position if fence not found
|
304
|
+
raise ValueError(f"Unclosed code fence starting at line {initial_line + 1}")
|
300
305
|
|
301
306
|
def parse_blockquote(self):
|
302
307
|
start = self.pos
|
File without changes
|
File without changes
|
File without changes
|
{markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/markdown_analysis.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
{markdown_analysis-0.1.1 → markdown_analysis-0.1.2}/markdown_analysis.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|