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

Fix over-stripped comments in the inline code #28

Merged
merged 7 commits into from
May 29, 2018
Merged

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented May 24, 2018

This PR will fix over-stripped comments in the inline code on Marpit comment plugin.

We discover that a HTML comment wrapping by backtiks (`<!-- like this -->`) is vanished. This caused by processing parse comments earliar than the inline codes.

We are thinking that it solve by adding rule for inline parsing of comments like a background image plugin.

@yhatt yhatt added the bug Something isn't working label May 24, 2018
@yhatt
Copy link
Member Author

yhatt commented May 24, 2018

#25 gives a hint how to resolve this bug. We could resolve by parsing comment as like as markdown-it's html block rule.

@yhatt yhatt changed the title [Work in progress] Fix over-stripped comments in the inline code Fix over-stripped comments in the inline code May 27, 2018
Copy link
Member Author

@yhatt yhatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have changed the comment parsing approach to parse as HTML block. It would become not to work parsing in inline comment.

})

it('strips comment in rendering', () => {
// TODO: Supports inline comment
it.skip('strips comment in rendering', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline comment will become not to work by parsing comment as HTML block.

In the current use case (directive), this change may almost not affect the user. However, we are planning to use HTML comment as presenter notes in Marp. The inline comment will become to be used when a tool integrated with Marpit implements the presentation mode.

Currently, we mark a test case as pending.

@yhatt yhatt merged commit b44213b into master May 29, 2018
@yhatt yhatt deleted the bugfix-comment-in-code branch May 29, 2018 10:33
@yhatt yhatt mentioned this pull request Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant