Skip to content

How to tokenize multiline constructs? How to subtokenize their nested content? #62

Answered by wooorm
vadistic asked this question in Q&A
Discussion options

You must be logged in to vote

“Containers” come from the margin, such as a block quote or a list item. So, “indent based”.
If you have a start and end line, it’s flow. Code (fenced) and HTML (flow) are much more similar to what you’re doing.
Or, in fact, the directive “container”, which is actually flow: https://github.com/micromark/micromark-extension-directive/blob/29eb2a025d177ee02682c0a7e0cc142a4aaa6633/lib/syntax.js#L12.

The text works, but gets null/eof after single line

Set concrete: true on your construct: https://github.com/micromark/micromark-extension-directive/blob/29eb2a025d177ee02682c0a7e0cc142a4aaa6633/lib/tokenize-directive-container.js#L4.

Q2: Why all non-text hooks produce those errors for me? Wha…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@vadistic
Comment options

@wooorm
Comment options

@vadistic
Comment options

@wooorm
Comment options

@vadistic
Comment options

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