diff --git a/types/commonmark/commonmark-tests.ts b/types/commonmark/commonmark-tests.ts
index b85eb16ace..25ceac5695 100644
--- a/types/commonmark/commonmark-tests.ts
+++ b/types/commonmark/commonmark-tests.ts
@@ -36,7 +36,13 @@ const xmlRenderer = new commonmark.XmlRenderer({ sourcepos: true, time: true });
const xml = xmlRenderer.render(node);
console.log(xml);
-const htmlRenderer = new commonmark.HtmlRenderer({ safe: true, smart: true, sourcepos: true, time: true });
+const htmlRenderer = new commonmark.HtmlRenderer({
+ safe: true,
+ smart: true,
+ sourcepos: true,
+ time: true,
+ softbreak: "
",
+ });
const html = htmlRenderer.render(node);
console.log(html);
diff --git a/types/commonmark/index.d.ts b/types/commonmark/index.d.ts
index 7ceb1fd2c5..0f9c0f70a0 100644
--- a/types/commonmark/index.d.ts
+++ b/types/commonmark/index.d.ts
@@ -216,6 +216,12 @@ export interface HtmlRenderingOptions extends XmlRenderingOptions {
* if true, source position information for block-level elements will be rendered in the data-sourcepos attribute (for HTML) or the sourcepos attribute (for XML).
*/
sourcepos?: boolean;
+
+ /**
+ * A raw string to be used for a softbreak.
+ * For example, `{ softbreak: "
" }` treats a softbreak as `
`.
+ */
+ softbreak?: string;
}
export interface XmlRenderingOptions {