We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5baf876 + 30f6293 commit 95a7debCopy full SHA for 95a7deb
src/block/node/ExternalLinkNode.ts
@@ -3,9 +3,9 @@ import { createNodeParser } from './creator'
3
import type { LinkNode } from './type'
4
import type { NodeCreator } from './creator'
5
6
-const hrefFirstUrlRegExp = /\[https?:\/\/[^\s\]]+(?:\s+[^\]]*[^\s])?\]/
7
-const contentFirstUrlRegExp = /\[[^\]]*[^\s]\s+https?:\/\/[^\s\]]+\]/
8
-const httpRegExp = /(?<=^| )https?:\/\/[^\s\]]+/
+const hrefFirstUrlRegExp = /\[https?:\/\/[^\s\]]+(?:\s+[^[\]]*[^\s])?\]/
+const contentFirstUrlRegExp = /\[[^[\]]*[^\s]\s+https?:\/\/[^\s\]]+\]/
+const httpRegExp = /(?<=^| )https?:\/\/[^[\s\]]+/
9
10
const createExternalLinkNode: NodeCreator<LinkNode> = raw => {
11
const inner = raw.startsWith('[') && raw.endsWith(']') ? raw.substring(1, raw.length - 1) : raw
0 commit comments