Skip to content

Commit 1ec2fb8

Browse files
authored
feat: Add support for `` inside of Marked Link Brackets (#1091)
1 parent 07fb1ce commit 1ec2fb8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/output/plugins/MarkedLinksPlugin.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ export class MarkedLinksPlugin extends ContextAwareRendererComponent {
4949
*/
5050
private replaceBrackets(text: string): string {
5151
return text.replace(this.brackets, (match: string, content: string): string => {
52-
const split = MarkedLinksPlugin.splitLinkText(content);
53-
return this.buildLink(match, split.target, split.caption);
52+
const monospace = content[0] === '`' && content[content.length - 1] === '`';
53+
const split = MarkedLinksPlugin.splitLinkText(monospace ? content.slice(1, -1) : content);
54+
return this.buildLink(match, split.target, split.caption, monospace);
5455
});
5556
}
5657

0 commit comments

Comments
 (0)