From 6dcbc5e3bde37fc9de003930a3537b7cc6c70bd7 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sun, 12 Jan 2025 17:59:03 +0100 Subject: [PATCH] [LaTeX] Fix case-insensitive comment keyword --- LaTeX/Bibtex.sublime-syntax | 2 +- LaTeX/tests/syntax_test_bibtex.bib | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/LaTeX/Bibtex.sublime-syntax b/LaTeX/Bibtex.sublime-syntax index bdbad7b3b3..139cc83a0a 100644 --- a/LaTeX/Bibtex.sublime-syntax +++ b/LaTeX/Bibtex.sublime-syntax @@ -42,7 +42,7 @@ contexts: pop: 1 comments: - - match: (@)Comment\b + - match: (@)(?i:comment)\b scope: keyword.declaration.comment.bibtex captures: 1: punctuation.definition.keyword.bibtex diff --git a/LaTeX/tests/syntax_test_bibtex.bib b/LaTeX/tests/syntax_test_bibtex.bib index 5b075ee9d5..b16021372a 100644 --- a/LaTeX/tests/syntax_test_bibtex.bib +++ b/LaTeX/tests/syntax_test_bibtex.bib @@ -1,5 +1,20 @@ % SYNTAX TEST "Packages/LaTeX/Bibtex.sublime-syntax" +@comment Ignore content +% <- comment.line.at-sign.bibtex keyword.declaration.comment.bibtex punctuation.definition.keyword.bibtex +%^^^^^^^^^^^^^^^^^^^^^^ comment.line.at-sign.bibtex +%^^^^^^^ keyword.declaration.comment.bibtex + +@COMMENT Ignore content +% <- comment.line.at-sign.bibtex keyword.declaration.comment.bibtex punctuation.definition.keyword.bibtex +%^^^^^^^^^^^^^^^^^^^^^^ comment.line.at-sign.bibtex +%^^^^^^^ keyword.declaration.comment.bibtex + +@Comment Ignore content +% <- comment.line.at-sign.bibtex keyword.declaration.comment.bibtex punctuation.definition.keyword.bibtex +%^^^^^^^^^^^^^^^^^^^^^^ comment.line.at-sign.bibtex +%^^^^^^^ keyword.declaration.comment.bibtex + @string{mar = "march"} % <- meta.declaration.bibtex keyword.declaration.constant.bibtex punctuation.definition.keyword.bibtex %^^^^^^ meta.declaration.bibtex keyword.declaration.constant.bibtex