We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32e8c66 commit ba2fbc4Copy full SHA for ba2fbc4
1 file changed
packages/bytemd/src/utils.ts
@@ -10,6 +10,8 @@ import stringify from 'rehype-stringify';
10
import ghSchema from 'hast-util-sanitize/lib/github.json';
11
import { ViewerProps } from '.';
12
13
+const schemaStr = JSON.stringify(ghSchema);
14
+
15
export function getProcessor({
16
sanitize,
17
plugins,
@@ -22,7 +24,7 @@ export function getProcessor({
22
24
23
25
p = p.use(remarkRehype, { allowDangerousHtml: true }).use(rehypeRaw);
26
- let schema = ghSchema;
27
+ let schema = JSON.parse(schemaStr);
28
schema.attributes['*'].push('className'); // Add className
29
if (sanitize) schema = sanitize(schema);
30
0 commit comments