-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Double slashes in PHP strings #1097
Comments
Thanks for reporting this. This is definitely a bug. The problem is, that the |
zeitgeist87
added a commit
to zeitgeist87/prism
that referenced
this issue
Feb 10, 2017
This patch is an attempt to fix the PHP language, when it is combined with markup. The problem is, that markup has a higher priority than all other tokens. This leads to weird errors, where HTML tags are highlighted inside of comments PrismJS#197. One solution to this was to set the `greedy` flag for the comment token, but this leads to far worse errors like PrismJS#1097. This patch should fix both issues PrismJS#197 and PrismJS#1097, by switching the grammar to markup on the fly. One potential problem is, that it relies on the `<?php` tag to detect if markup is present. So if a PHP file contains only markup and no PHP code at all, the result will look broken.
Merged
zeitgeist87
added a commit
to zeitgeist87/prism
that referenced
this issue
Feb 11, 2017
This patch is an attempt to fix the PHP language, when it is combined with markup. The problem is, that markup has a higher priority than all other tokens. This leads to weird errors, where HTML tags are highlighted inside of comments PrismJS#197. One solution to this was to set the `greedy` flag for the comment token, but this leads to far worse errors like PrismJS#1097. This patch should fix both issues PrismJS#197 and PrismJS#1097, by switching the grammar to markup on the fly. One potential problem is, that it relies on the `<?php` tag to detect if markup is present. So if a PHP file contains only markup and no PHP code at all, the result will look broken.
zeitgeist87
added a commit
to zeitgeist87/prism
that referenced
this issue
Mar 10, 2017
This patch is an attempt to fix the PHP language, when it is combined with markup. The problem is, that markup has a higher priority than all other tokens. This leads to weird errors, where HTML tags are highlighted inside of comments PrismJS#197. One solution to this was to set the `greedy` flag for the comment token, but this leads to far worse errors like PrismJS#1097. This patch should fix both issues PrismJS#197 and PrismJS#1097, by switching the grammar to markup on the fly. One potential problem is, that it relies on the `<?php` tag to detect if markup is present. So if a PHP file contains only markup and no PHP code at all, the result will look broken.
zeitgeist87
added a commit
to zeitgeist87/prism
that referenced
this issue
May 8, 2017
This patch is an attempt to fix the PHP language, when it is combined with markup. The problem is, that markup has a higher priority than all other tokens. This leads to weird errors, where HTML tags are highlighted inside of comments PrismJS#197. One solution to this was to set the `greedy` flag for the comment token, but this leads to far worse errors like PrismJS#1097. This patch should fix both issues PrismJS#197 and PrismJS#1097, by switching the grammar to markup on the fly. One potential problem is, that it relies on the `<?php` tag to detect if markup is present. So if a PHP file contains only markup and no PHP code at all, the result will look broken.
This issue should be fixed by #1100 |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I have two backslashes in a php string, Prism will mark the rest of the line as a comment.
The text was updated successfully, but these errors were encountered: