Skip to content

Commit

Permalink
Wording improvements in README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
mity committed Jan 11, 2024
1 parent 3209f97 commit 35ca9b0
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,20 +207,20 @@ details may be somewhat outdated.

## FAQ

**Q: How does MD4C compare to a parser XY?**
**Q: How does MD4C compare to other Markdown parsers?**

**A:** Some other implementations combine Markdown parser and HTML generator
into a single entangled code hidden behind an interface which just allows the
conversion from Markdown to HTML. They are often unusable if you want to
process the input in any other way.

Even when the parsing is available as a standalone feature, most parsers (if
not all of them; at least within the scope of C/C++ language) are full DOM-like
parsers: They construct abstract syntax tree (AST) representation of the whole
Markdown document. That takes time and it leads to bigger memory footprint.
Second, most parsers (if not all of them; at least within the scope of C/C++
language) are full DOM-like parsers: They construct abstract syntax tree (AST)
representation of the whole Markdown document. That takes time and it leads to
bigger memory footprint.

It's completely fine as long as you really need it. If you don't need the full
AST, there is a very high chance that using MD4C will be substantially faster
Build AST is completely fine as long as you really need it. If you don't need
it, there is a very high chance that using MD4C will be substantially faster
and less hungry in terms of memory consumption.

Last but not least, some Markdown parsers are implemented in a naive way. When
Expand All @@ -244,9 +244,8 @@ a valid Markdown document. (In practice, this more or less always means UTF-8
encoding.)

In other words, according to the specification, it does not matter whether some
Markdown syntax construction is in some way broken or not. If it is broken, it
will simply not be recognized and the parser should see it just as a verbatim
text.
Markdown syntax construction is in some way broken or not. If it's broken, it
won't be recognized and the parser should see it just as a verbatim text.

MD4C takes this a step further: It sees any sequence of bytes as a valid input,
following completely the GIGO philosophy (garbage in, garbage out). I.e. any
Expand Down

0 comments on commit 35ca9b0

Please sign in to comment.