diff --git a/tools/doc/html.js b/tools/doc/html.js
index 4b1c0a0e69b2c1..3dd6f83da503df 100644
--- a/tools/doc/html.js
+++ b/tools/doc/html.js
@@ -208,7 +208,7 @@ function parseLists(input) {
headingIndex = -1;
heading = null;
}
- tok.text = parseAPIHeader(tok.text);
+ tok.text = parseAPIHeader(tok.text).replace(/\n/g, ' ');
output.push({ type: 'html', text: tok.text });
return;
} else if (state === 'MAYBE_STABILITY_BQ') {