Skip to content

Commit 785306a

Browse files
committed
refactor regex for inline monospace
1 parent 5085f2f commit 785306a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/markupParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function parseMarkup(sourceUri: vscode.Uri, sourceText: string) {
6969
tag = tag.replace(/\+([^\+]*)\+/g, "<u>$1</u>");
7070
tag = tag.replace(/\^([^\^]*)\^/g, "<sup>$1</sup>");
7171
tag = tag.replace(/~([^~]*)~/g, "<sub>$1</sub>");
72-
tag = tag.replace(/\{{2}([^\{\{]*)\}{2}/g, `<code style='font-family: ${MONOSPACE_FONT_FAMILY}'>$1</code>`);
72+
tag = tag.replace(/\{{2}([^\{{2}]*)\}{2}/g, `<code style='font-family: ${MONOSPACE_FONT_FAMILY}'>$1</code>`);
7373
tag = tag.replace(/\?{2}(.*)\?{2}/g, "<cite>$1</cite>");
7474
tag = tag.replace(/\{color:(\w+)\}(.*)\{color\}/g, "<span style='color:$1;'>$2</span>");
7575

0 commit comments

Comments
 (0)