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

Highlight incomplete block comments #828

Closed
wants to merge 1 commit into from
Closed

Highlight incomplete block comments #828

wants to merge 1 commit into from

Conversation

ashkitten
Copy link

No description provided.

@@ -1,7 +1,7 @@
Prism.languages.clike = {
'comment': [
{
pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
pattern: /(\/\*[\w\W]*?\*\/)|(\/\*[\w\W]*)/,
Copy link
Member

Choose a reason for hiding this comment

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

Why not just make the closing bit optional then, with (\/\*)?? This is exactly what this does, but with more duplication.

@LeaVerou
Copy link
Member

Thanks! See comment.

@Golmote Golmote closed this in 3426ed1 Sep 9, 2017
@Golmote
Copy link
Contributor

Golmote commented Sep 9, 2017

I made the change manually. @LeaVerou actually just making the closing bit optional would not have worked because the lack of greediness would have stopped the highlighting far too soon. I found a way by adding a $ anchor as an alternative to the closing bit.

@ashkitten
Copy link
Author

Oh sorry, forgot about this. Thanks @Golmote for implementing it, when I put my new website up I'll be sure to update it with this change.

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.

3 participants