Skip to content

Commit cf355dd

Browse files
committed
#310 Update wikilink regex to ignore empty brackets
1 parent c4dc61c commit cf355dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/components/toastui/extendedAutolinks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function parseUrlLink(source) {
7676
// end of raw toast-ui source
7777

7878
function parseWikiLink(source) {
79-
const matched = source.matchAll(/\[\[(.*?)\]\]/g);
79+
const matched = source.matchAll(/\[\[\s*(\S(?:[^\[\]]*?\S)?)\s*\]\]/g);
8080
if (matched) {
8181
return Array.from(matched).map((match) => {
8282
const text = match[1];

0 commit comments

Comments
 (0)