Skip to content

Can I pass a custom definition context to the parser? #154

Closed Answered by kkshinkai
kkshinkai asked this question in General
Discussion options

You must be logged in to vote

I figured it out myself ... I misunderstood normalizeIdentifier, it works now:

const parseContext = micromark.parse();
parseContext.defined = ["LABEL"]
//                      ^^^^^^^ use normalized string "LABEL" instead of "label"
const tokenizeConetext = parseContext.document();
const events = micromark.postprocess(tokenizeConetext.write(chunks))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wooorm
Comment options

Answer selected by kkshinkai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants