{"record":{"id":"a8e15d6f9283c382","repo":"quarkusio/quarkus","slug":"unable-to-find-source-block-delimiter-for-property","errorCode":null,"errorMessage":"Unable to find source block delimiter for property ${propertyPath} at line ${lineNumber}","messagePattern":"Unable to find source block delimiter for property (.+?) at line (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"devtools/config-doc-maven-plugin/src/main/java/io/quarkus/maven/config/doc/generator/AsciidocFormatter.java","lineNumber":104,"sourceCode":"\n        StringBuilder rewrittenGuide = new StringBuilder();\n        StringBuilder currentBuffer = new StringBuilder();\n        boolean inSourceBlock = false;\n        boolean findDelimiter = false;\n        String currentSourceBlockDelimiter = \"----\";\n        int lineNumber = 0;\n\n        for (String line : lines) {\n            lineNumber++;\n\n            if (inSourceBlock) {\n                if (findDelimiter) {\n                    rewrittenGuide.append(line + \"\\n\");\n                    if (line.isBlank() || line.startsWith(\".\")) {\n                        continue;\n                    }\n                    if (!line.startsWith(SOURCE_BLOCK_DELIMITER)) {\n                        throw new IllegalStateException(\"Unable to find source block delimiter for property \"\n                                + propertyPath + \" at line \" + lineNumber);\n                    }\n                    currentSourceBlockDelimiter = line.stripTrailing();\n                    findDelimiter = false;\n                    continue;\n                }\n\n                if (line.stripTrailing().equals(currentSourceBlockDelimiter)) {\n                    inSourceBlock = false;\n                }\n                rewrittenGuide.append(line + \"\\n\");\n                continue;\n            }\n            if (line.startsWith(SOURCE_BLOCK_PREFIX)) {\n                inSourceBlock = true;\n                findDelimiter = true;\n\n                if (currentBuffer.length() > 0) {","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/config-doc-maven-plugin/src/main/java/io/quarkus/maven/config/doc/generator/AsciidocFormatter.java#L86-L122","documentation":"AsciidocFormatter.rewriteAnchors post-processes descriptions that embed source blocks; when it expects the [source,...] delimiter line it instead finds a non-blank, non-delimiter line and throws IllegalStateException naming the property and line number. It guards the formatter's assumption about generated asciidoc structure.","triggerScenarios":"formatDescription processes a property whose javadoc/description contains a partial or malformed source block: content appears after the opening marker without the expected delimiter, or the description text was hand-edited into an unexpected shape.","commonSituations":"Custom javadoc in a config item includes asciidoc source syntax the formatter cannot parse; a template/format change altered line structure; trailing '.' lines interrupted the expected layout.","solutions":["Fix the description/javadoc of the reported propertyPath so any source block starts with the proper [source,...] delimiter line","Compare with a working config item's description formatting and mirror its structure","Report/upgrade if the plugin's formatter changed format expectations between versions"],"exampleFix":"// before (javadoc of the property)\nSome code:\nHttpServer http = ...;\n// after\nSome code:\n[source,java]\nHttpServer http = ...;","handlingStrategy":"validation","validationCode":"// Pre-check: every description with a source block must declare the delimiter\nif (description.contains(\"[source\") && !description.contains(\"[source,\")) {\n    throw new IllegalStateException(\"Malformed source block in: \" + propertyPath);\n}","typeGuard":null,"tryCatchPattern":"try {\n    mojo.execute();\n} catch (IllegalStateException e) {\n    if (e.getMessage().startsWith(\"Unable to find source block delimiter\")) {\n        // parse propertyPath/lineNumber from message and fix that javadoc\n    }\n}","preventionTips":["Follow the exact asciidoc source-block syntax in config javadoc","Avoid hand-editing generated descriptions","Test doc generation after changing javadoc formatting conventions"],"tags":["asciidoc","formatter","config-documentation"],"backgroundTag":"malformed-source-block","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}