i.e of the commit f436c30298.
It added bunch of checks all over the place, but most of them
shouldn't be needed: If they are true, our internal state is
already broken. In other words, those checks are hiding real bugs
and making debugging harder.
Hopefully the underlying bugs are already fixed in some of previous
commits addressing some fuzzing issues, like these:
* d775b5103e
* c6942ef03e
This allows the processor to tell whether an <A> tag is the result of
an autolink, and customize its output. For example, I want to emit an
autolink of an image URL as an <IMG> tag, and an autolink of a YouTube
URL as a video embed.
Fixes build error for iOS, you can set BUILD_MD2HTML_EXECUTABLE as OFF
Signed-off-by: Dylan <2894220@gmail.com>
Co-authored-by: Martin Mitáš <mity@morous.org>
Markdown 0.30 doesn't mandate right-trimming the contents of HTML lines.
Doing so is more work and breaks output compatibility with cmark, tested
with https://github.com/commonmark/cmark/commit/9393560.
This is needed because special handling of '|' is now done also if the
wiki-links extension is enabled so the chain is populated even with that
extension.
Fixes#174.
Previously these assigned a set of parser flags with an operator '='.
Now '|=' is used so that any preceding options affecting what extensions
to allow are not ignored.
* md_rollback: Restore dummy marks changed to virtual zero-length
closers.
* md_analyze_links: Be more careful in how we rollback contents
of a full wiki link (`[[destination|label]]`). The destination has to
be rollbacked completely (MD_ROLBACK_ALL) while the label only with
MD_ROLLBACK_CROSSING.
Fixes#173.
if we know that the bracket pair contains nested brackets. That makes
the label invalid anyway, therefore we know that there is no link ref.
def. to be found anyway.
In case of heavily nested bracket pairs, the lookup could lead to
quadratic parsing times.
Fixes#172.
The function performs a binary search over array of MD_LINE structs to
find a line the given offset lives on.
Replaced few linear scans for such lines with a call to this function.