Skip to content

sphinxdocs: fix rendering of args in directives with empty doc#2313

Merged
rickeylev merged 1 commit intobazel-contrib:mainfrom
rickeylev:sphinxdocs.fix.nodoc.with.arg
Oct 18, 2024
Merged

sphinxdocs: fix rendering of args in directives with empty doc#2313
rickeylev merged 1 commit intobazel-contrib:mainfrom
rickeylev:sphinxdocs.fix.nodoc.with.arg

Conversation

@rickeylev
Copy link
Copy Markdown
Collaborator

This fixes a bug where tag-classes/functions that didn't have a doc string, but did
have arguments/attributes, would render the args/attrs immediately after the directive
line, which made them get interpreter as direction options (settings that apply to
the overall directive) instead of doc fields nested within the directive (separate
block-level elements that get rendered).

To fix, update the code to ensure there's a newline between the directive line and
subsequent arg/attr lines. Also adds tests for this.

@rickeylev rickeylev requested a review from aignas as a code owner October 18, 2024 04:35
@rickeylev rickeylev enabled auto-merge October 18, 2024 04:35
@rickeylev rickeylev added this pull request to the merge queue Oct 18, 2024
Merged via the queue into bazel-contrib:main with commit 8f3538f Oct 18, 2024
@rickeylev rickeylev deleted the sphinxdocs.fix.nodoc.with.arg branch October 19, 2024 19:04
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.

2 participants