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.
* Emphasis sourcepos broken when in block
* internal_offset for blocks containing inlines
* Really awkward newline handling
* Count newlines in every inline that could contain
* Document
* Skip sourcepos tracking if disabled
* Start working on sourcepos for inlines.
* Add a sourcepos test case
* Fix up some offsets
* Record end_column
* Fix a test sourcepos
Just need to work out how to correctly increment line numbers over
breaks now
* Handle multi-line paras
* Refactor
* Another fix and another failing test
* maintain separate block offset
* Correct link offset calculations
* Add image to test
* Break some more tests!
* Fix code length calculation
* Consolidate end_column in text nodes
* WIP!
* Complete test for extensions
* Improve test harness output
* Strikethrough sourcepos
* Start on table sourcepos
* Table sourcepos WIP
* Finish up table sourcepos
* Fix up emphasis offset calc
* Reference link sourcepos is the ref itself
This is fine!
* Add casts for MSVC
* Use the more portable remove(3)
* Windows :(
* Link against dynamic exts in api_test
* Include extensions DLL in PATH
* Improve strbuf guarantees
Introduce BUFSIZE_MAX macro and make sure that the strbuf implementation
can handle strings up to this size.
* Abort early if document size exceeds internal limit
* Change types for source map offsets
Switch to size_t for the public API, making the public headers
C89-compatible again.
Switch to bufsize_t internally, reducing memory usage and improving
performance on 32-bit platforms.
* Make parser return NULL on internal index overflow
Make S_parser_feed set an error and ignore subsequent chunks if the
total input document size exceeds an internal limit. Make
cmark_parser_finish return NULL if an error was encountered. Add
public API functions to retrieve error code and error message.
strbuf overflow in renderers and OOM in parser or renderers still
cause an abort.
It's possible that cmark_chunk_set_cstr is called with a substring
(suffix) of the current string. Delay freeing of the chunk content
to handle this case correctly.
Fixes issue #139.
This did not allow for the possibility that a node
might have no containing block, causing the commonmark
renderer to segfault if passed an inline node with no
block parent.