Skip to content

Commit

Permalink
Fix #2061 indentation with begin/end on the same line.
Browse files Browse the repository at this point in the history
Indentation is increased on the `\begin` pattern when it is not followed
by the associated `\end` on the same line.

Indentation is decreased on the `\end` pattern but only when it is
located at the beginning of the line, possibly after some spaces.
  • Loading branch information
jlelong committed May 1, 2020
1 parent 3678694 commit 61d7b1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syntax/syntax.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
["$", "$"]
],
"indentationRules": {
"increaseIndentPattern": "(\\\\begin{(?!document))",
"decreaseIndentPattern": "(\\\\end{(?!document))"
"increaseIndentPattern": "\\\\begin{(?!document)([a-zA-Z]*)}(?!.*\\\\end{\\1})",
"decreaseIndentPattern": "^\\s*\\\\end{(?!document)"
},
"folding": {
"markers": {
Expand Down

0 comments on commit 61d7b1a

Please sign in to comment.