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

Improve rendering header and footer to use inline tokens #66

Merged
merged 4 commits into from
Sep 6, 2018

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Sep 6, 2018

This PR will improve rendering of header/footer defined by directives, to use inline tokens instead of pre-rendered HTML.

So far, we are using html_block token for rendered the result of MarkdownIt.renderInline() directly. However, it has occured over-sanitizing HTML in @marp-team/marp-core. (Refer to this commit whose the added test has been failed)

Thus, we should use tokens rendered by parseInline instead of the raw HTML of renderInline. We also have added the validation whether directive is a string to prevent passing invalid value to parseInline.

Related to yhatt/marp#243.

@yhatt yhatt merged commit 93f39af into master Sep 6, 2018
@yhatt yhatt deleted the header-footer-token branch September 6, 2018 07:23
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