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

Use re-exported markdown-it Token from state #132

Merged
merged 2 commits into from
Feb 13, 2019
Merged

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Feb 12, 2019

To manipulate rendered tokens, we used markdown-it token from markdown-it/lib/token directly. But this way is not suitable for the policy of markdown-it plugins. When extends existed instance via applyMarkdownItPlugins, markdown-it version might not match between two Token classes.

We will fix to use the re-exported Token class by StateCore. Marpit can use the correct Token corresponded to the instance.

https://github.com/markdown-it/markdown-it/blob/bda94b0521f206a02427ec58cb9a848d9c993ccb/lib/rules_core/state_core.js#L16-L17

@yhatt yhatt merged commit bed150d into master Feb 13, 2019
@yhatt yhatt deleted the use-token-from-state branch February 13, 2019 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant