summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-06-24 15:17:53 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-06-24 15:17:53 +0800
commit10a2c8b545414e54310da70fe246bcd027bbada0 (patch)
tree8583ef3655063ae63da4337a0a0928c3baa8b166
parentc648e23cdfc73d7a0ac95141d10325acd08737e7 (diff)
downloadlua-language-server-10a2c8b545414e54310da70fe246bcd027bbada0.zip
多行字符串应该忽略第一个空行
-rw-r--r--server/src/parser/grammar.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index a876c3ba..7aa280ba 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -246,7 +246,7 @@ StringDef <- {'"'}
/ {"'"}
{~(Esc / !%nl !"'" .)*~} -> 1
("'" / {} -> MissQuote2)
- / ('[' {} {:eq: '='* :} {} '['
+ / ('[' {} {:eq: '='* :} {} '[' %nl?
{(!StringClose .)*} -> 1
(StringClose / {}))
-> LongString