syntax: ruby: colorize embedded documentation as a comment

Vim and Emacs do this too.

Reference:
  https://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Lexicology

Also, when colorizing double-hashed comments specially anyway,
avoid colorizing ##.* as a single-hashed comment.
master
Benno Schulenberg 2021-10-25 13:32:10 +02:00
parent 7691527f35
commit 375b30507e
1 changed files with 2 additions and 1 deletions

View File

@ -30,8 +30,9 @@ color brightgreen "#\{[^}]*\}"
color green "'([^']|\\')*'" "%[qw](\{[^}]*\}|\([^)]*\)|<[^>]*>|\[[^]]*\]|\$[^$]*\$|\^[^^]*\^|![^!]*!)"
# Comments.
color cyan "#([^{].*|$)"
color cyan "#([^{#].*|$)"
color brightcyan "##([^{].*|$)"
color cyan start="^=begin\>" end="^=end\>"
# Some common markers.
color brightcyan "XXX|TODO|FIXME|\?\?\?"