From 656ac65714bb22affb0b3177e59fd2789bcf961f Mon Sep 17 00:00:00 2001 From: Fuzzlix Date: Tue, 18 Aug 2015 14:02:16 +0200 Subject: [PATCH] fix: lpeg error fixed a error caused by newer lpeg versions. Test done using lpeg V0.12.2 and lua 5.3.1 --- src/lexers/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lexers/init.lua b/src/lexers/init.lua index bd7c5ee..299af67 100644 --- a/src/lexers/init.lua +++ b/src/lexers/init.lua @@ -35,7 +35,7 @@ local function compile_keywords(context, keywords) pattern = pattern and (pattern + p) or p end local B = context.word_boundary or B - local BB = lpeg.B(B, 1) + SOS -- starting boundary + local BB = lpeg.P(B, 1) + SOS -- starting boundary local AB = B + EOS -- ending boundary return BB * pattern * AB end