mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-16 17:41:21 +00:00
Merge pull request #13664 from overleaf/mj-bibtex-match-brackets
Add bibtex match brackets highlighting GitOrigin-RevId: d0ed07d9874f097dd8b59eff582eb23a59f46332
This commit is contained in:
parent
c16d2d5840
commit
e41bda3e61
1 changed files with 8 additions and 10 deletions
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
@top Bibliography {
|
||||
(Declaration | StringDeclaration)*
|
||||
}
|
||||
|
@ -15,7 +13,9 @@
|
|||
EntryTypeName { $[a-zA-Z]+ }
|
||||
Number { @digit+ }
|
||||
StringKeyword {"@"$[Ss]$[Tt]$[Rr]$[Ii]$[Nn]$[Gg]}
|
||||
"@" "{" "}" "\"" "," "#" "@string"
|
||||
"{"[closedBy="}"]
|
||||
"}"[openedBy="{"]
|
||||
"@" "\"" "," "#" "@string"
|
||||
Comment { "%" ![\n]* }
|
||||
}
|
||||
|
||||
|
@ -51,8 +51,8 @@ Expression {
|
|||
}
|
||||
|
||||
@local tokens {
|
||||
openBracedContents {"{"}
|
||||
closeBracedContents {"}"}
|
||||
OpenBracedContents[closedBy="}", @name="{"] {"{"}
|
||||
CloseBracedContents[openedBy="{", @name="}"] {"}"}
|
||||
@else nonClosingBracedContents
|
||||
}
|
||||
|
||||
|
@ -61,19 +61,17 @@ Expression {
|
|||
(
|
||||
nonClosingBracedContents |
|
||||
nestedBracedString {
|
||||
openBracedContents
|
||||
OpenBracedContents
|
||||
bracedStringContents
|
||||
closeBracedContents
|
||||
CloseBracedContents
|
||||
}
|
||||
)*
|
||||
}
|
||||
BracedString {
|
||||
"{"
|
||||
bracedStringContents closeBracedContents
|
||||
"{" bracedStringContents CloseBracedContents
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Implement this
|
||||
@precedence { concatenation @left }
|
||||
|
||||
StringConcatenation {
|
||||
|
|
Loading…
Reference in a new issue