diff --git a/src/utils/convert.ts b/src/utils/convert.ts index f58d159..c5a8731 100644 --- a/src/utils/convert.ts +++ b/src/utils/convert.ts @@ -567,7 +567,7 @@ function rehype2note(rehype: HRoot) { ? ancestors[ancestors.length - 1] : undefined; if (parent?.type == "element" && parent?.tagName === "pre") { - node.value = toText(node); + node.value = toText(node, { whitespace: "pre-wrap" }); node.type = "text"; } },