aboutsummaryrefslogtreecommitdiff
path: root/lua/lexers/latex.lua
diff options
context:
space:
mode:
authororbitalquark <70453897+orbitalquark@users.noreply.github.com>2024-09-18 14:30:49 -0400
committerRandy Palamar <randy@rnpnr.xyz>2025-01-04 12:29:07 -0700
commitc1f4d3f68787fa2ae964c468d28a84df37319b28 (patch)
treedcd62bd74f8f9fd786cba6a0c248fb388d5244a8 /lua/lexers/latex.lua
parentcc18cea14d1f836abcebb84a96f5029431474255 (diff)
downloadvis-c1f4d3f68787fa2ae964c468d28a84df37319b28.tar.gz
vis-c1f4d3f68787fa2ae964c468d28a84df37319b28.tar.xz
lexers: switch to tabs for indentation
Diffstat (limited to 'lua/lexers/latex.lua')
-rw-r--r--lua/lexers/latex.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/lexers/latex.lua b/lua/lexers/latex.lua
index c7e63be..f629407 100644
--- a/lua/lexers/latex.lua
+++ b/lua/lexers/latex.lua
@@ -12,7 +12,7 @@ local lex = lexer.new(...)
-- Comments.
local line_comment = lexer.to_eol('%')
local block_comment = lexer.range('\\begin' * P(' ')^0 * '{comment}',
- '\\end' * P(' ')^0 * '{comment}')
+ '\\end' * P(' ')^0 * '{comment}')
lex:add_rule('comment', lex:tag(lexer.COMMENT, line_comment + block_comment))
-- Math environments.
@@ -22,11 +22,11 @@ lex:add_rule('math', lex:tag('environment.math', '$' + '\\' * (S('[]()') + math_
-- LaTeX environments.
lex:add_rule('environment', lex:tag('environment', '\\' * (P('begin') + 'end') * P(' ')^0 * '{' *
- lexer.word * P('*')^-1 * '}'))
+ lexer.word * P('*')^-1 * '}'))
-- Sections.
lex:add_rule('section', lex:tag('command.section', '\\' *
- word_match('part chapter section subsection subsubsection paragraph subparagraph') * P('*')^-1))
+ word_match('part chapter section subsection subsubsection paragraph subparagraph') * P('*')^-1))
-- Commands.
lex:add_rule('command', lex:tag('command', '\\' * (lexer.alpha^1 + S('#$&~_^%{}\\'))))