mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
759 stars 140 forks source link

md_is_table_row: Remove the function. #97

Closed mity closed 4 years ago

mity commented 4 years ago

md_is_table_row() did some crazy inline parsing to detect whether the line contains at least one pipe which is not inside a code span or other high-priority inline element.

This was very complicated under the hood and to was actually breaking the clean design which separates block analysis parse and inline analysis of each block contents.

We now just use the table underline for determining the block is table and its properties.

This means a paragraph now cannot interrupt a table. This is a change in a behavior but likely acceptable one as it actually brings the behavior closer to behavior of tables in cmark-gfm in this regard.

Last but not least, it seems to prevent adoption of other useful features, for about that, see the discussion in PR #92.

codecov[bot] commented 4 years ago

Codecov Report

Merging #97 into master will decrease coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
- Coverage   94.02%   94.01%   -0.01%     
==========================================
  Files           1        1              
  Lines        2660     2642      -18     
==========================================
- Hits         2501     2484      -17     
+ Misses        159      158       -1
Impacted Files Coverage Δ
md4c/md4c.c 94.01% <100%> (-0.01%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e97d025...29e50cd. Read the comment docs.