-
Notifications
You must be signed in to change notification settings - Fork 556
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
Fixes for Yaml and PHP, improvements for XML #378
base: master
Are you sure you want to change the base?
Conversation
@@ -5,7 +5,7 @@ comment "//" | |||
color white start="<\?(php|=)?" end="\?>" | |||
# Constructs | |||
color brightblue "(class|extends|goto) ([a-zA-Z0-9_]*)" | |||
color brightblue "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|return|true|false|null|TRUE|FALSE|NULL|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in|namespace|use)[^a-z0-9_-]{1}" | |||
color brightblue "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|return|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in|namespace|use)[^a-z0-9_-]{1}" |
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.
Why is it [^a-z0-9_-]{1}
instead of just [^a-z0-9_-]
?
Also, if the [^a-z0-9_-]{1}
at the beginning and the end is to make sure these keywords (eg. echo
) are not part of another word, why not just wrap them up with \<
and \>
? (as described here)
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.
Probably I have no reason here. Notice that my change is just removing true|false|null|TRUE|FALSE|NULL|
since they should be highlighted brightmagenta below. Feel free to add a suggestion using github's suggestion feature if you want me to make a specific change to this PR. (I don't use nano these days (switched to micro), and I don't use PHP too much either).
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.
Okay, never mind. I'm just a volunteer so maybe we'll fix that some other day? By the way, thanks for mentioning micro!
Originally proposed in scopatz#378
Originally proposed in scopatz#378
Originally proposed in scopatz#378
Originally proposed in scopatz#378
Originally proposed in scopatz#378
Originally proposed in scopatz#378
Originally proposed in scopatz#378
* [Nginx] Update directives - Full list of directives updated from: http://nginx.org/en/docs/dirindex.html - Deleted 3 keywords, added 233 keywords * [Python] Improve colorings and fix bugs - Improve colorings based on iPython (colors=Linux): - Green for exceptions and function names. - Red for keywords such as `from` and `not`. - Cyan for keywords such as `for` and `if`. - Fix empty strings not correctly highlighted. - Fix block comments not correctly highlighted when nothing follows `===`. - Add support for "TODO". * Force all syntax regex to ends with $ - Lots of syntax regex are poorly written and did not ends with a '$', which caused them competing with other regex rules. * no octave.nanorc in .nano/nanorc * Apply hcl to "nomad" extension * nanorc.nanorc: icolor normal instead of brightnormal Fixes complaint from GNU nano from git, v6.3-7-g18a40caa: Error in /home/vorburger/dev/nanorc/nanorc.nanorc on line 26: Color 'normal' takes no prefix * nanooo * maj * Update Dockerfile * Update Dockerfile * add solidity highlighting * add zeek highlighting * fix highlighting for v2.9.* Get rid of message `Error in /usr/share/nano-syntax-highlighting/etc-hosts.nanorc on line 11: Color "normal" not understood.` after nano exits. * update documentation and installation script for v2.9 branch * remove comment syntax for compability with v2.3 * Update prolog.nanorc * Update prolog.nanorc * fix script run on Ubuntu 18.04 inflating: nanorc-2.9/zsh.nanorc linking: nanorc-2.9/zshrc.nanorc -> zsh.nanorc finishing deferred symbolic links: nanorc-2.9/gitcommit.nanorc -> git.nanorc nanorc-2.9/html.j2.nanorc -> html.nanorc nanorc-2.9/zshrc.nanorc -> zsh.nanorc + mv 'nanorc-v2.9/*' ./ mv: cannot stat 'nanorc-v2.9/*': No such file or directory + rm -rf nanorc-v2.9 + rm /tmp/nanorc.zip + '[' ']' + _update_nanorc + touch /c/Users/home/.nanorc install.sh: line 20: /c/Users/home/.nano/nanorc: No such file or directory * New Readme file, with more organised information. * Fix heading levels, remove quote sections * Fixed readme errors and wording * Fix block comments highlighting Signed-off-by: Harsh Shandilya <[email protected]> * Update .gitignore * Update nanorc.nanorc * * PHP: Fix highlighting of special values * * XML: Enhance with different opening/closing tag colors * * Yaml: Fix highlighting of spaces * Create shellcheck.yml * CI: migrate from Travis CI to Github Actions - Removed .travis.yml and shellcheck.sh - Added CI badge to README * CI: Add highlight_test and badges * [C] Add highlightings for "TODO" and g++ linter * [PowerShell] Various Enhancements Based on highlight.js - Basing on highlight.js, I enhanced the highlighting rules in various aspects. - See also: scopatz#358 * Fix shellcheck error * Enhancements: Batch, HTML, JS - [Batch] Fix that using "::" as comments sometimes failed - [html] Tabs give 2 spaces by default - [JS] Tabs give 2 spaces by default; Allow comments to be inline with code. - [Sh] Also highlight PKGBUILD; Fix `${v%tail}` not highlighted; Use shellcheck as linter * [test] Adapt new error message and new behavior - New error message "Standard input is not a terminal" should be ignored. - nano changed its behavior to produce error messages AFTER program exited. * Added matching for shebang headers like #!/bin/php Should also match: #!/usr/bin/env php #!php * Ditto in .zsh files * Update yaml.nanorc It's valid for yaml files like this to exist: ```yaml - my - list - of - strings ``` * mdown * Add .typescript and .javascript support * feat: add create-branches.sh * fix create-branches script to work upstream * Create switch-branch.sh * chmod +x switch-branch.sh * fix: rename to pre-5.0 color names * fix: comment out 4.5's tabgives * Add syntax highlighting for pipe operator in elixir.nanorc file * Add syntax highlighting for Expect scripts. File is a copy of tcl.nanorc with Expect commands added (Expect is a TCL extension). * Modified expect.nanorc * Added Zig to default nanorc * Fixed Zig nanorc file * markdown heading fix and added tagging * color fix * comments Removed commented lines and adjusted heading comments * fix(hcl): only highlight keywords when they're actually keywords * Syntax highlighting for Julia * Few more unicode operators * handle transpose operator * Remove syntax error * [ps] Change to a more mainstream color-coding convension - Use the same coding convension as most languages' (eg. bash) highlighting colors. * [powershell] Various enhancements - Commands: - remove not workable regex - change to use *official-approved verbs* instead - add 157 builtin aliases - Comparison operators: - add 47 more operators not been covered - Keywords (statement): - add 28 more keywords not been covered - Types: - add 14 new types highlighting - Comments: - fix a buggy case of block comment - Quoted text: - add a here-string case not been covered * Including mdx as part of the markdown.nanorc * Improved and separated ledger and beancount syntaxes * Fix heading levels, remove quote sections * fix(yaml): highlighting of spaces Originally proposed in scopatz#378 * feat(subrip): Add subrip.nanorc Originally proposed in scopatz#380 * fix(etc-hosts): Made path regex match more strict. This got me in a lot of trouble with a file path containing /vhosts/ so made it more strict. Originally proposed in scopatz#386 * fix(git): Git uses tabs in config files, we should warn on spaces but not tabs * fix(js): fix cotal -> octal typo * chore(powershell): Add note about comment syntax seeming a bit off * chore(readme): Update readme with fork information * Update name extracted from master.zip The master.zip contains a folder "nano-syntax-highlighting-master" now in the fork where originally it extracted as "nanorc-master". --------- Signed-off-by: Harsh Shandilya <[email protected]> Co-authored-by: davidhcefx <[email protected]> Co-authored-by: KaKooDa <[email protected]> Co-authored-by: André <[email protected]> Co-authored-by: Michael Vorburger ⛑️ <[email protected]> Co-authored-by: 0x07CB <[email protected]> Co-authored-by: ak <a@k> Co-authored-by: Ondřej Ešler <[email protected]> Co-authored-by: Ondřej Ešler <[email protected]> Co-authored-by: Nicolas Vitaterna <[email protected]> Co-authored-by: Muhammad Hussein Fattahizadeh <[email protected]> Co-authored-by: CSRedRat <[email protected]> Co-authored-by: Tiago Almeida <[email protected]> Co-authored-by: Sandro <[email protected]> Co-authored-by: CryptoDragonLady <[email protected]> Co-authored-by: Harsh Shandilya <[email protected]> Co-authored-by: hdquemada <[email protected]> Co-authored-by: Hector Quemada <[email protected]> Co-authored-by: Zach DeCook <[email protected]> Co-authored-by: bravoman <[email protected]> Co-authored-by: Samantaz Fox <[email protected]> Co-authored-by: Will Stott <[email protected]> Co-authored-by: Yash Singh <[email protected]> Co-authored-by: Ross Smith II <[email protected]> Co-authored-by: Francine Guimarães <[email protected]> Co-authored-by: Dennis Rardin <[email protected]> Co-authored-by: Exonorid <[email protected]> Co-authored-by: Bruce DuPlanty <[email protected]> Co-authored-by: Bruce <[email protected]> Co-authored-by: Gareth Jones <[email protected]> Co-authored-by: Tymoteusz Wołodźko <[email protected]> Co-authored-by: Tymoteusz Wołodźko <[email protected]> Co-authored-by: Feixu <[email protected]> Co-authored-by: Mike Foden <[email protected]> Co-authored-by: AlphaJack <[email protected]> Co-authored-by: Sven Wick <[email protected]> Co-authored-by: Galen Guyer <[email protected]> Co-authored-by: Simon Thyßen <[email protected]>
No description provided.