Skip to content

Commit b146adf

Browse files
committed
fix table regex
1 parent fa083a3 commit b146adf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/markupParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ export function parseMarkup(sourceUri: vscode.Uri, sourceText: string) {
118118
}
119119

120120
//Table
121-
let tab_th_re = /\s*\|{2}.*$/gi;
122-
let tab_td_re = /\s*\|.*$/gi;
121+
let tab_th_re = /\s*[^{]*\|{2}[^}]*$/gi;
122+
let tab_td_re = /\s*[^{]*\|[^}]*$/gi;
123123
if (!html_tag && (tag.match(tab_th_re) || tag.match(tab_td_re))) {
124124
tag = tag.replace(/^\|{2,}/, '\|\|');
125125
tag = tag.replace(/^\|{2}/, '<th>');

0 commit comments

Comments
 (0)