Skip to content

How do we access the nlcst from remark-retext mutate mode? #589

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

You must be logged in to vote

Hi there!

The .parse function only performs the parsing stage. .run and .runSync can be used to perform the run stage (running plugins).
More info available here.

And it’s good to see them as different processors:

var processor = unified().use(parse).use(remark2retext, english.Parser)

var tree_from_md = processor.runSync(processor.parse(doc))

Replies: 1 comment 1 reply

Comment options

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

Answer selected by tvquizphd
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