Skip to content

Commit caae7f2

Browse files
committed
don't use Pandoc variable to avoid problem for complex DOCTYPE
1 parent 32550ee commit caae7f2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/core/pandoc/self-contained.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ export const pandocIngestSelfContainedContent = async (
5454

5555
const input: string[] = [];
5656
input.push("````````{=html}");
57+
if (doctypeMatch) {
58+
input.push(doctypeMatch[0]);
59+
}
5760
input.push(dom.documentElement!.outerHTML);
5861
input.push("````````");
5962

@@ -64,9 +67,6 @@ export const pandocIngestSelfContainedContent = async (
6467
cmd.push("--template", template);
6568
cmd.push("--output", filename);
6669
cmd.push("--metadata", "title=placeholder");
67-
if (doctypeMatch) {
68-
cmd.push("--variable", `doctype=${doctypeMatch[0]}`);
69-
}
7070
cmd.push("--embed-resources");
7171
if (resourcePath && resourcePath.length) {
7272
cmd.push("--resource-path", resourcePath.join(":"));
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
$if(doctype)$$doctype$$endif$
21
$body$

0 commit comments

Comments
 (0)