Ruby: Add support for %{…} percent string literals

This commit is contained in:
Alex Leferry 2 2020-07-09 11:24:22 +02:00
parent e509a8e9cd
commit 2219f0ef78

View File

@ -48,10 +48,10 @@ add-highlighter shared/ruby/backtick region '(?<![$:])`' (?<!\\)(\\\\)*`
add-highlighter shared/ruby/regex region '(?<![$:])/' (?<!\\)(\\\\)*/[imox]* regions
add-highlighter shared/ruby/ region '#' '$' fill comment
add-highlighter shared/ruby/ region ^=begin ^=end fill comment
add-highlighter shared/ruby/ region -recurse \( '%[iqrswxIQRSWX]\(' \) fill meta
add-highlighter shared/ruby/ region -recurse \{ '%[iqrswxIQRSWX]\{' \} fill meta
add-highlighter shared/ruby/ region -recurse \[ '%[iqrswxIQRSWX]\[' \] fill meta
add-highlighter shared/ruby/ region -recurse < '%[iqrswxIQRSWX]<' > fill meta
add-highlighter shared/ruby/ region -recurse \( '%[iqrswxIQRSWX]?\(' \) fill meta
add-highlighter shared/ruby/ region -recurse \{ '%[iqrswxIQRSWX]?\{' \} fill meta
add-highlighter shared/ruby/ region -recurse \[ '%[iqrswxIQRSWX]?\[' \] fill meta
add-highlighter shared/ruby/ region -recurse < '%[iqrswxIQRSWX]?<' > fill meta
add-highlighter shared/ruby/heredoc region '<<[-~]?(?!self)(\w+)' '^\h*(\w+)$' fill string
add-highlighter shared/ruby/division region '[\w\)\]](/|(\h+/\h+))' '\w' group # Help Kakoune to better detect /…/ literals