-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
buggood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from communitylanguage
Description
Describe the issue
TeX magic comments are, in most editors, case insensitive, so both lines below are interpreted:
% !TeX program = lualatex
% !TEX encoding = UTF-8
% ^ note e vs. E herebut the MAGIC_COMMENT rule only highlights the TeX (first) line:
highlight.js/src/languages/latex.js
Lines 106 to 111 in 2dd87a6
| const MAGIC_COMMENT = { | |
| className: 'meta', | |
| begin: '% !TeX', | |
| end: '$', | |
| relevance: 10 | |
| }; |
Which language seems to have the issue?
latex
Are you using highlight or highlightAuto?
I don't know? highlight I think because the language is specified explicitly.
Sample Code to Reproduce
% !TeX program = lualatex
% !TEX encoding = UTF-8
% ^ note e vs. E hereExpected behavior
In the sample above, lines 1 and 2 should be highlighted as MAGIC_COMMENT, and line 3 should be a regular COMMENT:
Metadata
Metadata
Assignees
Labels
buggood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from communitylanguage

