Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/), and this
## [0.3.17] - 2026-05-29

### Fixed
- **🔧 Subscript/superscript scope leak** - The token colour rule targeted the generic `markup.subscript` / `markup.superscript` TextMate scopes, which other grammars (standard Markdown, AsciiDoc, reStructuredText) also emit. Because `editor.tokenColorCustomizations` is contributed globally, this greyed out subscript/superscript text in every file type, not just rxiv documents. The scopes are now namespaced to `markup.subscript.rxiv` / `markup.superscript.rxiv`, and the grammar gained matching rules for `~subscript~` and `^superscript^`, so the colouring is both scoped to rxiv files and actually applied (the previous rule matched nothing the grammar emitted).
- **🔧 Subscript/superscript scope leak** - The token colour rule targeted the generic `markup.subscript` / `markup.superscript` TextMate scopes, which other grammars (standard Markdown, AsciiDoc, reStructuredText) also emit. Because `editor.tokenColorCustomizations` is contributed globally, this greyed out subscript/superscript text in every file type, not just rxiv documents. The scopes are now namespaced to `markup.subscript.rxiv` / `markup.superscript.rxiv`, and the grammar gained matching rules for `~subscript~` and `^superscript^`, so the colouring is both scoped to rxiv files and actually applied (the previous rule matched nothing the grammar emitted). The `~`/`^` delimiters are also scoped as `punctuation.definition.{subscript,superscript}.{begin,end}.rxiv`, consistent with the bold/italic rules, so themes can style the delimiters independently of the content.

## [0.3.16] - 2026-05-29

Expand Down
12 changes: 10 additions & 2 deletions syntaxes/rxiv-markdown.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,20 @@
},
{
"name": "markup.subscript.rxiv",
"match": "(?<!~)~([^~\\s]+)~(?!~)",
"match": "(?<!~)(~)([^~\\s]+)(~)(?!~)",
"captures": {
"1": {"name": "punctuation.definition.subscript.begin.rxiv"},
"3": {"name": "punctuation.definition.subscript.end.rxiv"}
},
"comment": "Subscript text with ~text~ (e.g. H~2~O); single tilde, no spaces, avoids ~~strikethrough~~"
},
{
"name": "markup.superscript.rxiv",
"match": "\\^([^\\^\\s]+)\\^",
"match": "(\\^)([^\\^\\s]+)(\\^)",
"captures": {
"1": {"name": "punctuation.definition.superscript.begin.rxiv"},
"3": {"name": "punctuation.definition.superscript.end.rxiv"}
},
"comment": "Superscript text with ^text^ (e.g. E=mc^2^)"
},
{
Expand Down
Loading