aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlua/html.lua
diff options
context:
space:
mode:
authormitchell <unknown>2020-07-14 10:09:33 -0400
committermitchell <unknown>2020-07-14 10:09:33 -0400
commita4a5a6907acf6361618a8aa723a4bacc489f270a (patch)
treed1a946fe3d01eb3403bd602ee06a241f4089426d /lexlua/html.lua
parent6dcfbc6a747c0a20e21b53ef0a780bc0ad24da05 (diff)
downloadscintilla-mirror-a4a5a6907acf6361618a8aa723a4bacc489f270a.tar.gz
lexlua: Minor pattern refactoring.
Diffstat (limited to 'lexlua/html.lua')
-rw-r--r--lexlua/html.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexlua/html.lua b/lexlua/html.lua
index 416fc69cd..c43f336a6 100644
--- a/lexlua/html.lua
+++ b/lexlua/html.lua
@@ -3,7 +3,7 @@
local lexer = require('lexer')
local token, word_match = lexer.token, lexer.word_match
-local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V
+local P, S, V = lpeg.P, lpeg.S, lpeg.V
local lex = lexer.new('html')
@@ -87,7 +87,7 @@ lex:add_rule('string', string)
-- Numbers.
lex:add_rule('number', #lexer.digit * lexer.last_char_includes('=') *
- token(lexer.NUMBER, lexer.digit^1 * P('%')^-1))--*in_tag)
+ token(lexer.NUMBER, lexer.dec_num * P('%')^-1))--*in_tag)
-- Entities.
lex:add_rule('entity', token('entity', '&' * (lexer.any - lexer.space - ';')^1 *