Skip to content

Commit

Permalink
Merge pull request #172 from 91khr/master
Browse files Browse the repository at this point in the history
fix: lua long bracket strings
  • Loading branch information
luochen1990 committed Nov 15, 2021
2 parents f1cb0d3 + 5013d8b commit c18071e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autoload/rainbow_main.vim
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ let s:rainbow_conf = {
\ 'html': {
\ 'parentheses': ['start=/\v\<((script|style|area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=#</\z1># fold'],
\ },
\ 'lua': {
\ 'parentheses': ["start=/(/ end=/)/", "start=/{/ end=/}/", "start=/\\v\\[\\ze($|[^[])/ end=/\\]/"],
\ },
\ 'perl': {
\ 'syn_name_prefix': 'perlBlockFoldRainbow',
\ },
Expand Down
12 changes: 12 additions & 0 deletions tests/test.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function(args)
lst = { a=function(arg) print("hello") end,
b=(1+2)*3/4,
[3+5]={ ["hello"]=("hi") },
}
lst[
(function() return 0 end)()] = 1
end)("blah")

[[
Special lua string...
]]

0 comments on commit c18071e

Please sign in to comment.