mirror of
https://github.com/youfoundjk/TeXcore.git
synced 2026-07-22 07:33:31 +00:00
feat(snippets): add 'Clean Double Dollar Symbols' text transform snippet
This commit is contained in:
parent
80f7042a57
commit
e1f8b1831b
1 changed files with 11 additions and 0 deletions
|
|
@ -68,6 +68,10 @@ function cleanZoteroHighlightLine(input: string): string {
|
|||
);
|
||||
}
|
||||
|
||||
function cleanDoubleDollarSymbols(input: string): string {
|
||||
return input.replace(/\$\$/g, "$");
|
||||
}
|
||||
|
||||
export const BUILTIN_TEXT_TRANSFORM_SNIPPETS: TextTransformSnippet[] = [
|
||||
{
|
||||
id: "kebab-case",
|
||||
|
|
@ -97,6 +101,13 @@ export const BUILTIN_TEXT_TRANSFORM_SNIPPETS: TextTransformSnippet[] = [
|
|||
keywords: ["zotero", "mark", "highlight", "citation"],
|
||||
transform: cleanZoteroHighlightLine,
|
||||
},
|
||||
{
|
||||
id: "clean-double-dollar-symbols",
|
||||
name: "Clean Double Dollar Symbols",
|
||||
description: "Replace all $$ with $",
|
||||
keywords: ["dollar", "latex", "equation", "cleanup"],
|
||||
transform: cleanDoubleDollarSymbols,
|
||||
},
|
||||
];
|
||||
|
||||
export function runTextTransformSnippet(editor: Editor, snippet: TextTransformSnippet): TextTransformResult {
|
||||
|
|
|
|||
Loading…
Reference in a new issue