Age | Commit message (Collapse) | Author |
|
Adds an internal field to the parser struct to keep track
of last_buffer_ended_with_cr.
|
|
This keeps track of when we have gotten partway
through a tab when consuming initial indentation.
|
|
* Reformatted all source files.
* Added 'format' target to Makefile.
* Removed 'astyle' target.
* Updated .editorconfig.
|
|
We no longer preprocess tabs to spaces before parsing.
Instead, we keep track of both the byte offset and
the (virtual) column as we parse block starts.
This allows us to handle tabs without converting
to spaces first. Tabs are left as tabs in the output.
Added `column` and `first_nonspace_column` fields to `parser`.
Added utility function to advance the offset, computing
the virtual column too.
Note that we don't need to deal with UTF-8 here at all.
Only ASCII occurs in block starts.
Significant performance improvement due to the fact that
we're not doing UTF-8 validation -- though we might want
to add that back in.
|
|
There are probably a couple of places I missed. But this will only
be a problem if we use a 64-bit bufsize_t at some point. Then, we'll
get warnings from -Wshorten-64-to-32.
|
|
Added fields `offset`, `first_nonspace`, `indent`, and `blank`
to `cmark_parser` struct.
This just removes some repetition in the code.
|
|
For consistency with the API.
|
|
Also to some non-exported functions in blocks and inlines.
|
|
API exports cmark_node_get_column.
XML writer indicates start and end line and column for block-level
nodes.
|
|
Reverts 225d720.
|
|
This isn't needed any more since we don't expose these in the API.
|
|
Replace cmark_parser_process_line with cmark_parser_push that takes
arbitrary chunks of data. Also fixes #211.
|
|
cmark_doc_parser => cmark_parser
cmark_new_doc_parser => cmark_parser_new
cmark_free_doc_parser => cmark_parser_free
cmark_finish => cmark_parser_finish
cmark_process_line => cmark_parser_process_line
cmark_node_destroy => cmark_node_free
Closes #223.
|
|
|
|
|