Skip to content
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

Add exposing list markers *, -, +, or numeric to AST and API. #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 6, 2017

  1. Add exposing list markers *, -, +, or numeric to AST and API.

    Prior to this commit the node struct for a list contained a member to
    store whatever char was parsed from the markdown, but this value
    wasn't exposed through the API, nor was it made available in the
    output of the AST in any format.
    
    Following this commit a `cmark_marker_type` struct has been added to
    capture various forms of list markers: `CMARK_NUMERIC_MARKER` (for
    ordered lists) and `CMARK_ASTERISK_MARKER`, `CMARK_HYPHEN_MARKER`, &
    `CMARK_PLUS_MARKER` (for unordered lists). The value of which is
    stored in the `marker` member of the `cmark_list` node struct.
    
    This enables two primary features:
    
    1. The bullet marker types are now preserved when converting from
    markdown to markdown.
    2. The XML representation of the AST now has a `marker="hyphen"` (as
    well as numeric, asterisk, and plus) as an attribute on the list
    nodes. This is similar to the `delim="period"` attribute available on
    ordered list nodes.
    
    Tests have been added and are passing. The original test suite still
    passes as well. This commit also updates the racket-lang wrapper to
    support these new features as well as fixes a minor bug for a missing
    `no_delim` symbol because `NO_DELIM` wasn't defined in cmark.h
    Nathan Aschbacher committed Aug 6, 2017
    Configuration menu
    Copy the full SHA
    cd9ab8f View commit details
    Browse the repository at this point in the history