Skip to content

Commit 6033b99

Browse files
committed
don't run postprocessor in wrong formats
1 parent 114b79c commit 6033b99

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/command/render/pandoc.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,9 @@ export async function runPandoc(
433433
postprocessors.push(...(extras.postprocessors || []));
434434

435435
// Fix H1 title inconsistency
436-
htmlPostprocessors.push(canonicalizeTitlePostprocessor);
436+
if (isHtmlFileOutput(options.format.pandoc)) {
437+
htmlPostprocessors.push(canonicalizeTitlePostprocessor);
438+
}
437439

438440
// add a keep-source post processor if we need one
439441
if (

0 commit comments

Comments
 (0)