We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4161639 + 579ff70 commit ca3c99aCopy full SHA for ca3c99a
app/helpers/markdown-to-html.ts
@@ -44,6 +44,12 @@ export default class MarkdownToHtml extends Helper<Signature> {
44
node.setAttribute('target', '_blank');
45
node.setAttribute('rel', 'noopener noreferrer');
46
}
47
+
48
+ // https://github.com/PrismJS/prism/issues/3658
49
+ // PrismJS unconditionally adds a tabindex to <pre> elements, without any opt-out
50
+ if (node.nodeName === 'PRE') {
51
+ node.setAttribute('tabindex', '-1');
52
+ }
53
});
54
55
return DOMPurify.sanitize(generatedHtml);
0 commit comments