Do not open internal links in new tab
This commit is contained in:
parent
f955397a37
commit
bff4955151
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ const formatFunction = {
|
||||||
table: tableBlock => renderTable(tableBlock),
|
table: tableBlock => renderTable(tableBlock),
|
||||||
code: codePart => tag.code(text(codePart.text)),
|
code: codePart => tag.code(text(codePart.text)),
|
||||||
text: textPart => text(textPart.text),
|
text: textPart => text(textPart.text),
|
||||||
link: linkPart => tag.a({href: linkPart.url, className: "link", target: "_blank", rel: "noopener" }, renderParts(linkPart.inlines)),
|
link: linkPart => tag.a({href: linkPart.url, className: "link", target: linkPart.internal ? "_self" : "_blank", rel: "noopener" }, renderParts(linkPart.inlines)),
|
||||||
pill: renderPill,
|
pill: renderPill,
|
||||||
format: formatPart => tag[formatPart.format](renderParts(formatPart.children)),
|
format: formatPart => tag[formatPart.format](renderParts(formatPart.children)),
|
||||||
rule: () => tag.hr(),
|
rule: () => tag.hr(),
|
||||||
|
|
Reference in a new issue