Skip to content

Commit ee73b72

Browse files
committed
fix #34, fix regex for monospace format
1 parent 5deb165 commit ee73b72

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
@@ -73,7 +73,7 @@ export function parseMarkup(sourceUri: vscode.Uri, sourceText: string) {
7373
tag = tag.replace(/\+([^+]*)\+/g, "<u>$1</u>");
7474
tag = tag.replace(/\^([^^]*)\^/g, "<sup>$1</sup>");
7575
tag = tag.replace(/~([^~]*)~/g, "<sub>$1</sub>");
76-
tag = tag.replace(/\{{2}([^{{2}]*)\}{2}/g, `<code style='font-family: ${MONOSPACE_FONT_FAMILY}'>$1</code>`);
76+
tag = tag.replace(/\\}/g, "&rbrace;").replace(/\{{2}(.*?)\}{2}/g, `<code style='font-family: ${MONOSPACE_FONT_FAMILY}'>$1</code>`);
7777
tag = tag.replace(/\?{2}(.*)\?{2}/g, "<cite>$1</cite>");
7878
tag = tag.replace(/\{color:([^}]+)\}/g, "<span style='color:$1;'>").replace(/\{color\}/g, '</span>');
7979

0 commit comments

Comments
 (0)