-
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
Add Nginx #776
Add Nginx #776
Conversation
Thanks for contributing! Would you mind adding an example file, that reflects most of the features and flaws, following the format of the existing ones ? |
Also, please keep your changes on separated branches, so that this PR contains only Nginx-related stuff. You just pushed vim support ^^ |
|
||
Prism.languages.nginx = Prism.languages.extend('clike', { | ||
comment: { | ||
pattern: /(^|[^"{\\])(#.*?(\r?\n|$))/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll need a lookbehind: true
here, so that no char is consumed before the comment.
Also, you probably don't need the last group ; /(^|[^"{\\])#.*/
should be enough (since it does not match line feeds).
I did a quick review. Please take a look at my inline comments. |
Adding Nginx highlighting.
Extracted from this gist https://gist.github.com/misiek08/6566480