-
-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement parsing extensions #123
base: master
Are you sure you want to change the base?
Implement parsing extensions #123
Commits on Jun 8, 2016
-
Implement and expose block parsing API.
+ Document the parser structure for internal usage.
Configuration menu - View commit details
-
Copy full SHA for b8af879 - Browse repository at this point
Copy the full SHA b8af879View commit details -
[API]: parser: Expose 'setter' methods in cmark_parser.
As opposed to the previous commit, where I exposed getters for the private parser structure, this exposes two methods that will influence parsing, cmark_parser_add_child and cmark_parser_advance_offset.
Configuration menu - View commit details
-
Copy full SHA for f2e9eff - Browse repository at this point
Copy the full SHA f2e9effView commit details -
[API]: node: implement and expose cmark_node_set_type.
This is necessary for extensions implementing vertical rules. An example is setext headings: A heading --------- When cmark parses 'A heading', it first creates a paragraph block to contain it, it's only when cmark parses the second line that the type of the block is changed to the CMARK_NODE_TYPE_HEADING type.
Configuration menu - View commit details
-
Copy full SHA for 96f966e - Browse repository at this point
Copy the full SHA 96f966eView commit details -
[API]: node: implement and expose cmark_node_set_user_data_free_func.
Ideally, this would be passed in set_user_data, but this would break API.
Configuration menu - View commit details
-
Copy full SHA for 8075d64 - Browse repository at this point
Copy the full SHA 8075d64View commit details -
[API]: node: Expose string_content.
By implementing cmark_node_get_string_content and cmark_node_set_string_content. This is useful for vertical rules in extensions, as they may need to access it in order to decide whether to update the block. Unfortunately, this overlaps with get_literal and set_literal. As far as I can tell we should deprecate these functions, and have them follow the get_string_content code path and set_string_content for the while.
Configuration menu - View commit details
-
Copy full SHA for 0839b4b - Browse repository at this point
Copy the full SHA 0839b4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 19ffd43 - Browse repository at this point
Copy the full SHA 19ffd43View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d8a9dc - Browse repository at this point
Copy the full SHA 9d8a9dcView commit details -
And expose and implement block parsing hooks
Configuration menu - View commit details
-
Copy full SHA for d2f829f - Browse repository at this point
Copy the full SHA d2f829fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1bc58d0 - Browse repository at this point
Copy the full SHA 1bc58d0View commit details -
cmark executable: add extension switches
Allow listing and attaching extensions. Also cleanup valgrind a little by removing exits and using cleanup gotos
Configuration menu - View commit details
-
Copy full SHA for e707529 - Browse repository at this point
Copy the full SHA e707529View commit details -
Define blocks constituting a table.
We have no syntax rules yet for creating them natively, but future extensions may provide some.
Configuration menu - View commit details
-
Copy full SHA for fe08f83 - Browse repository at this point
Copy the full SHA fe08f83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 634833c - Browse repository at this point
Copy the full SHA 634833cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 228be72 - Browse repository at this point
Copy the full SHA 228be72View commit details -
Configuration menu - View commit details
-
Copy full SHA for c174e30 - Browse repository at this point
Copy the full SHA c174e30View commit details -
Configuration menu - View commit details
-
Copy full SHA for 315f477 - Browse repository at this point
Copy the full SHA 315f477View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f64582 - Browse repository at this point
Copy the full SHA 5f64582View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fbb2e6 - Browse repository at this point
Copy the full SHA 7fbb2e6View commit details -
cmark_parser: improve lifecycle management.
This slightly breaks API as finish will now return NULL after it has been called once, but I believe that's for the best. This fixes potential leaks of root when a parser was fed but not finished, and makes reusing a parser instance multiple times possible.
Configuration menu - View commit details
-
Copy full SHA for 44b2d76 - Browse repository at this point
Copy the full SHA 44b2d76View commit details -
syntax-extension: add "priv" field.
+ And pointer to a free function as well.
Configuration menu - View commit details
-
Copy full SHA for cf19502 - Browse repository at this point
Copy the full SHA cf19502View commit details -
cmark_parser: implement and expose reentrant feed function.
This can be useful for transclusion extensions for example, http://talk.commonmark.org/t/transclusion-or-including-sub-documents-for-reuse/270
Configuration menu - View commit details
-
Copy full SHA for 389216b - Browse repository at this point
Copy the full SHA 389216bView commit details