From 329559b74b483576a74d5f87eebf951bd12b9200 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 7 Jul 2020 20:14:11 -0400 Subject: lexlua: Added `lexer.colors` and `lexer.styles` tables for themes and lexers. This allows for a more Lua table-oriented approach to defining and using colors and styles, instead of manually manipulating Scintilla property strings. Themes and lexers are still backwards compatible, as the underlying mechanisms are still in place. --- lexlua/mediawiki.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lexlua/mediawiki.lua') diff --git a/lexlua/mediawiki.lua b/lexlua/mediawiki.lua index 27a7409d8..942e06612 100644 --- a/lexlua/mediawiki.lua +++ b/lexlua/mediawiki.lua @@ -28,7 +28,7 @@ lex:add_style('tag_end', lexer.STYLE_KEYWORD) lex:add_rule('link', token(lexer.STRING, S('[]'))) lex:add_rule('internal_link', B('[[') * token('link_article', (lexer.any - '|' - ']]')^1)) -lex:add_style('link_article', lexer.STYLE_STRING .. ',underlined') +lex:add_style('link_article', lexer.STYLE_STRING .. {underlined = true}) -- Templates and parser functions. lex:add_rule('template', token(lexer.OPERATOR, S('{}'))) @@ -37,7 +37,7 @@ lex:add_rule('parser_func', B('{{') * lex:add_rule('template_name', B('{{') * token('template_name', (lexer.any - S('{}|'))^1)) lex:add_style('parser_func', lexer.STYLE_FUNCTION) -lex:add_style('template_name', lexer.STYLE_OPERATOR .. ',underlined') +lex:add_style('template_name', lexer.STYLE_OPERATOR .. {underlined = true}) -- Operators. lex:add_rule('operator', token(lexer.OPERATOR, S('-=|#~!'))) -- cgit v1.2.3