-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Multiline comments not working #12
Comments
Is this a prism thing or do you think it's limited to this plugin? |
I thought of that. I didn't dive into how the plugin works. I just know that I applied the plugin and multi-line comments were not working. I'm not sure how to isolate the problem to just Prism or the plugin. My setup for Eleventy was pretty simple. You can see my I am injecting Typography.js onto the page but that only affects the CSS, not the Prism parsing. I did notice though that the Prism version used in the plugin (v1.15.0) is not the latest (v1.16.0). Again, I doubt this is the issue though. |
Not at a computer currently, can you compare with https://prismjs.com/test.html#language=javascript What language did you pass in from your content? |
It must be the plugin. It works on prismjs. I cloned the Eleventy Base Blog and multi line comments don't work there either. And here is the same input on the base blog. I added the snippet to |
I wonder if this is related to #9 The new line in the middle of a parsed element is throwing off the parsing. |
It appears that the highlight line is interfering with multiline elements in the code blocks. markdownSyntaxHighlight.js PrismJS wraps the whole block in one span including all the line breaks. <span class="token comment">/*
* block comment
* goes here
*/</span> I imagine the output should look something like <span class="line-comment"><span class="token comment">/*</span></span><br>
<span class="line-comment"><span class="token comment"> * block comment </span></span>
... |
When I try to add a multi line comment in any c like language it doesn't render properly. I didn't add any extensions to Prism.
The text was updated successfully, but these errors were encountered: