Age | Commit message (Collapse) | Author |
|
Removes CMARK_OPT_SAFE from options.
Adds CMARK_OPT_UNSAFE, with the opposite meaning.
The new default behavior is to suppress raw HTML and
potentially dangerous links. The CMARK_OPT_UNSAFE
option has to be set explicitly to prevent this.
--------------------------------------------------------
NOTE: This change will require modifications in
bindings for cmark and in most libraries and programs
that use cmark.
--------------------------------------------------------
Closes #239, #273.
Borrows heavily from @kivikakk's patch in github/cmark-gfm#123.
|
|
Check for empty buffer when rendering
|
|
|
|
Keep track of the last position where a thematic break
failed to match on a line, to avoid rescanning unnecessarily.
See commonmark/cmark#284.
|
|
|
|
As with other static functions.
|
|
Use this to avoid unnecessary recursion in ends_with_blank_line.
Closes #284.
|
|
to avoid unnecessary repetition. Once we settle
whether a list item ends in a blank line, we don't
need to revisit this in considering parent list items.
See commonmark/cmark#284.
|
|
|
|
|
|
In accord with spec change.
|
|
|
|
Update the Racket wrapper
|
|
Use pledge(2) on OpenBSD
|
|
|
|
|
|
|
|
correct sourcepos for emphasis inlines
|
|
We can't rely on anything in `subj` since it's been modified while parsing the
subject and could represent line info from a future line. This is simple and
works.
|
|
|
|
|
|
Fixes jgm/pandoc#5033.
|
|
Fix a typo in houdini_href_e.c
|
|
|
|
This is needed for round-trip tests.
|
|
|
|
|
|
Add xml:space="preserve" in XML output when appropriate
|
|
XSLT stylesheet to convert cmark XML back to Commonmark
|
|
- Remove outdated comment
- Fix code block delimiter
|
|
Initial version of an XSLT stylesheet that converts the XML format
produced by `cmark -t xml` back to Commonmark.
Fixes #264
|
|
|
|
Closes #263.
|
|
|
|
build: only attempt to install MSVC system libraries on Windows
|
|
Newer versions of CMake attempt to query the system for information about the VS
2017 installation. Unfortunately, this query fails on non-Windows systems when
cross-compiling:
cmake_host_system_information does not recognize <key> VS_15_DIR
CMake will not find these system libraries on non-Windows hosts anyways, and we
were silencing the warnings, so simply omit the installation when
cross-compiling to Windows.
|
|
Closes #251.
|
|
|
|
|
|
These affect both parsing and writing commonmark.
|
|
|
|
|
|
add link parsing corner cases to regressions
|
|
|
|
With current HTML escaping, sometimes we may produce an XML tag like
<code_block> </code_block>
Many XML parsers consider these spaces insignificant and strip them
out but we need this. There's actually a test case like this in
spec.txt (search "A code block can have all empty lines as its
content:") and without proper hinting, an external xml->html converter
will fail the spec.
XML standard covers this case. If xml:space is "preserve", then
whitespaces are significant and should be kept. Add this hint for
text, code, code_block, html_inline and html_block tags.
|
|
|
|
Added regression test.
See commonmark/CommonMark#527.
|
|
- commented out the (already ignored) "many references" test, which
times out
- reduced the iterations for a couple other tests
|
|
|
|
We were needlessly redoing things we'd already done.
Now we skip the work if the first nonspace is greater
than the current offset.
This fixes pathological slowdown with deeply nested
lists (#255). For N = 3000, the time goes from over
17s to about 0.7s.
Thanks to @mity for diagnosing the problem.
|