Skip to content

Commit f14260b

Browse files
authored
fix(oxhugo): Do not discard embedded HTML (#2151)
In 'processors/parse.ts' the 'remarkRehype' plugin is used with 'allowDangerousHtml' enabled, but that needs to be combined with (e.g.) 'rehypeRaw' to have any effect on the output.
1 parent 9ad3481 commit f14260b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

quartz/plugins/transformers/oxhugofm.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { QuartzTransformerPlugin } from "../types"
2+
import rehypeRaw from "rehype-raw"
3+
import { PluggableList } from "unified"
24

35
export interface Options {
46
/** Replace {{ relref }} with quartz wikilinks []() */
@@ -102,5 +104,9 @@ export const OxHugoFlavouredMarkdown: QuartzTransformerPlugin<Partial<Options>>
102104
}
103105
return src
104106
},
107+
htmlPlugins() {
108+
const plugins: PluggableList = [rehypeRaw]
109+
return plugins
110+
},
105111
}
106112
}

0 commit comments

Comments
 (0)