markdown-analysis 0.1.0__tar.gz → 0.1.1__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.
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/PKG-INFO +1 -1
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/markdown_analysis.egg-info/PKG-INFO +1 -1
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/mrkdwn_analysis/markdown_analyzer.py +16 -6
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/setup.py +1 -1
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/LICENSE +0 -0
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/README.md +0 -0
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/markdown_analysis.egg-info/SOURCES.txt +0 -0
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/markdown_analysis.egg-info/dependency_links.txt +0 -0
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/markdown_analysis.egg-info/requires.txt +0 -0
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/markdown_analysis.egg-info/top_level.txt +0 -0
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/mrkdwn_analysis/__init__.py +0 -0
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/setup.cfg +0 -0
- {markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/test/__init__.py +0 -0
@@ -233,6 +233,7 @@ class MarkdownParser:
|
|
233
233
|
separator_line = self.lines[self.pos+1].strip()
|
234
234
|
self.pos += 2
|
235
235
|
rows = []
|
236
|
+
|
236
237
|
while self.pos < self.length:
|
237
238
|
line = self.lines[self.pos].strip()
|
238
239
|
if not line or self.starts_new_block(line):
|
@@ -240,12 +241,21 @@ class MarkdownParser:
|
|
240
241
|
rows.append(line)
|
241
242
|
self.pos += 1
|
242
243
|
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
244
|
+
def parse_row(row):
|
245
|
+
parts = row.strip().split('|')
|
246
|
+
if parts and not parts[0]:
|
247
|
+
parts.pop(0)
|
248
|
+
if parts and not parts[-1]:
|
249
|
+
parts.pop()
|
250
|
+
return [p.strip() for p in parts]
|
251
|
+
|
252
|
+
header_cells = parse_row(header_line)
|
253
|
+
data_rows = [parse_row(row) for row in rows]
|
254
|
+
|
255
|
+
self.tokens.append(BlockToken('table', meta={
|
256
|
+
"header": header_cells,
|
257
|
+
"rows": data_rows
|
258
|
+
}, line=start+1))
|
249
259
|
|
250
260
|
def starts_new_block(self, line):
|
251
261
|
return (self.ATX_HEADER_RE.match(line) or
|
File without changes
|
File without changes
|
File without changes
|
{markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/markdown_analysis.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
{markdown_analysis-0.1.0 → markdown_analysis-0.1.1}/markdown_analysis.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|