Skip to content

Fix extra spaces in the generated configuration docs - #6148

Open
deepdishgary wants to merge 1 commit into
apache:mainfrom
deepdishgary:docs/config-docs-line-breaks
Open

deepdishgary wants to merge 1 commit into
apache:mainfrom
deepdishgary:docs/config-docs-line-breaks

Conversation

@deepdishgary

Copy link
Copy Markdown
Contributor

The configuration reference pages under site/content/in-dev/unreleased/configuration/config-sections/ have extra spaces wherever the source Javadoc wraps to a new line. The extra spaces came up in the reviews of #5779 and #5972.

  • MarkdownFormatter turns each line break into a space but keeps the next line's indentation, so every wrapped line gives two or more spaces, for example ends it early in a list item.
  • A {@code} tag that wraps to the next line has a body that starts with a line break. The formatter treated that as a word break, so it put a space before or after the code span, for example `prod` . and ( `x`).

This change collapses a line break and the indentation around it into one space. It also stops adding a separator around a code span because of whitespace inside the tag. TestMarkdownFormatter covers both cases. The expected strings in TestDocGenTool and the regenerated pages differ only in whitespace (git diff -w shows no change). The regenerated pages include the Cloudflare R2 page from #5972.

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Added a changelog entry in changelog.d/ (if needed, see changelog.d/README.md)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

This branch has not been deployed

No deployments
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.

1 participant