Skip to content

Commit 6886bca

Browse files
committed
Revert "Added new way to fix internal hyperlinks"
This reverts commit 5917273.
1 parent 901eeae commit 6886bca

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

components/Molecules/MarkedWrapper.vue

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,9 @@ export default {
1616
required: true,
1717
},
1818
},
19-
methods: {
20-
// Replace (#item1) → <a id="item1"></a>
21-
convertAnchors(md) {
22-
// Match all (#something) patterns that are *not part of a markdown link*
23-
// Negative lookbehind avoids touching [text](#itemX)
24-
return md.replace(
25-
/(?<!\[.*?)\(#([\w-]+)\)(?!\))/g,
26-
(_match, id) => `<a id="${id}"></a>`
27-
);
28-
},
29-
},
3019
computed: {
3120
markup() {
32-
const processed = this.convertAnchors(this.markdown);
33-
const html = marked(processed);
34-
return DOMPurify.sanitize(html);
21+
return DOMPurify.sanitize(marked(this.markdown));
3522
},
3623
},
3724
};

0 commit comments

Comments
 (0)