mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-19 10:54:06 -06:00
fix(oxhugo): Do not discard embedded HTML (#2151)
Some checks failed
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
Some checks failed
Build and Test / publish-tag (push) Has been cancelled
Docker build & push image / build (push) Has been cancelled
Build and Test / build-and-test (macos-latest) (push) Has been cancelled
Build and Test / build-and-test (ubuntu-latest) (push) Has been cancelled
Build and Test / build-and-test (windows-latest) (push) Has been cancelled
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.
This commit is contained in:
parent
9ad3481da6
commit
f14260b2ba
@ -1,4 +1,6 @@
|
|||||||
import { QuartzTransformerPlugin } from "../types"
|
import { QuartzTransformerPlugin } from "../types"
|
||||||
|
import rehypeRaw from "rehype-raw"
|
||||||
|
import { PluggableList } from "unified"
|
||||||
|
|
||||||
export interface Options {
|
export interface Options {
|
||||||
/** Replace {{ relref }} with quartz wikilinks []() */
|
/** Replace {{ relref }} with quartz wikilinks []() */
|
||||||
@ -102,5 +104,9 @@ export const OxHugoFlavouredMarkdown: QuartzTransformerPlugin<Partial<Options>>
|
|||||||
}
|
}
|
||||||
return src
|
return src
|
||||||
},
|
},
|
||||||
|
htmlPlugins() {
|
||||||
|
const plugins: PluggableList = [rehypeRaw]
|
||||||
|
return plugins
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user