diff --git a/nixos/lib/make-options-doc/mergeJSON.py b/nixos/lib/make-options-doc/mergeJSON.py
index db14808e84e..1f30e4315cf 100644
--- a/nixos/lib/make-options-doc/mergeJSON.py
+++ b/nixos/lib/make-options-doc/mergeJSON.py
@@ -73,7 +73,7 @@ class Renderer(mistune.renderers.BaseRenderer):
return f"{escape(text)}"
def block_code(self, text, info=None):
info = f" language={quoteattr(info)}" if info is not None else ""
- return f"\n{escape(text)}"
+ return f"{escape(text)}"
def link(self, link, text=None, title=None):
tag = "link"
if link[0:1] == '#':
diff --git a/nixos/lib/make-options-doc/options-to-docbook.xsl b/nixos/lib/make-options-doc/options-to-docbook.xsl
index ac49659c681..39d34fb8633 100644
--- a/nixos/lib/make-options-doc/options-to-docbook.xsl
+++ b/nixos/lib/make-options-doc/options-to-docbook.xsl
@@ -75,7 +75,8 @@
Default:
-
+
+
@@ -83,7 +84,8 @@
Example:
-
+
+
@@ -124,7 +126,8 @@
-
+
+