Skip to content

Fix asciidoctor.option.requires parsing for diagram support#801

Open
ascheman wants to merge 1 commit intojbake-org:masterfrom
ascheman:bugfix/778-fix-asciidoctor-diagram-requires-parsing
Open

Fix asciidoctor.option.requires parsing for diagram support#801
ascheman wants to merge 1 commit intojbake-org:masterfrom
ascheman:bugfix/778-fix-asciidoctor-diagram-requires-parsing

Conversation

@ascheman
Copy link
Copy Markdown
Contributor

Summary

  • Fix asciidoctor.option.requires parsing: DefaultJBakeConfiguration.getAsciidoctorOption() returns a List<String>, but the old code used String.valueOf(list).split(",") which produced values like [asciidoctor-diagram] with literal brackets, causing JRuby require to fail silently
  • Add parseRequires() method that handles both Collection and comma-separated String forms correctly
  • Add unit tests for parseRequires() and an integration test that renders a PlantUML sequence diagram via asciidoctor-diagram
  • Document asciidoctor.option.requires in default.properties

Fixes #778

Test plan

  • Unit tests for parseRequires() cover: single/multi-element lists, comma-separated strings, whitespace trimming, null/empty handling, bracket-leak regression guard
  • Integration test configures asciidoctor.option.requires=asciidoctor-diagram and verifies a PlantUML sequence diagram is rendered to an <img> tag
  • All existing tests pass (./gradlew :jbake-core:test)

🤖 Generated with Claude Code

DefaultJBakeConfiguration.getAsciidoctorOption() returns a List<String>,
but the old code used String.valueOf(list).split(",") which produced
values like "[asciidoctor-diagram]" with literal brackets, causing
JRuby require to fail silently.

parseRequires() now handles both Collection and comma-separated String
forms correctly. Adds unit tests and an integration test with
asciidoctor-diagram rendering a PlantUML sequence diagram.

Fixes jbake-org#778

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jbake-maven-plugin does not seem to be working with asciidoctorj-diagram

1 participant