diff --git a/docs/src/main/java/io/quarkus/docs/generation/AssembleDownstreamDocumentation.java b/docs/src/main/java/io/quarkus/docs/generation/AssembleDownstreamDocumentation.java index 2a88d1d2b106c..a12f247b1ecb7 100755 --- a/docs/src/main/java/io/quarkus/docs/generation/AssembleDownstreamDocumentation.java +++ b/docs/src/main/java/io/quarkus/docs/generation/AssembleDownstreamDocumentation.java @@ -355,6 +355,15 @@ private static void copyAsciidoc(Path sourceFile, Path targetFile, Set d lineNumber++; if (!documentTitleFound && line.startsWith("= ")) { + // anything in the buffer needs to be appended + // we don't need to rewrite it as before the title we can only have the preamble + // and we don't want to change anything in the preamble + // if at some point we want to adjust the preamble, make sure to do it in a separate method and not reuse rewriteContent + if (currentBuffer.length() > 0) { + rewrittenGuide.append(currentBuffer); + currentBuffer.setLength(0); + } + // this is the document title rewrittenGuide.append(line.replace(PROJECT_NAME_ATTRIBUTE, RED_HAT_BUILD_OF_QUARKUS) + "\n"); documentTitleFound = true;