Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add experimental math syntax highlighting #1096

Merged
merged 3 commits into from
Jan 3, 2025
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
6 changes: 6 additions & 0 deletions syntaxes/textmate/feature.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Feature Flags
*/
export const SYNTAX_WITH_BOLD_ITALIC = false;
export const SYNTAX_WITH_MATH = false;
export const SYNTAX_WITH_LANGS = true;
4 changes: 2 additions & 2 deletions syntaxes/textmate/fenced.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as textmate from "./textmate.mjs";
import { languages as rawLanguages } from "./fenced.meta.mjs";
import { SYNTAX_WITH_LANGS } from "./feature.mjs";

const IDENTIFIER_BARE = /[\p{XID_Start}_][\p{XID_Continue}_\-]*/u;

Expand Down Expand Up @@ -84,8 +85,7 @@ const genLang = (
};
};

const RENDER_LANGS = true;
export const blockRawLangs = RENDER_LANGS ? rawLanguages.map(genLang) : [];
export const blockRawLangs = SYNTAX_WITH_LANGS ? rawLanguages.map(genLang) : [];

export const inlineRaw: textmate.Pattern = {
name: "markup.raw.inline.typst string.other.raw.typst",
Expand Down
Loading
Loading