Skip to content

Some minor fixes how doxygen is rendered in a needs card - #17

Merged
tobiaskaestner merged 2 commits into
mainfrom
tkaestner/rst-inline-markup
Oct 13, 2026
Merged

tobiaskaestner merged 2 commits into
mainfrom
tkaestner/rst-inline-markup

Conversation

@tobiaskaestner

@tobiaskaestner tobiaskaestner commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Two fixes in the conversion of Doxygen prose to RST.

  • Inline markup next to a word. RST accepts inline markup only with a space or a punctuation mark around it. Doxygen prose such as data_r[] or k_msgq_init()ed gave ``data_r``[] and showed the raw markup, with "Inline literal start-string without end-string" warnings. The converter now puts an escaped space (\ ) between the markup and such a neighbour. RST takes the escaped space as the boundary and removes it from the output. The comments are valid Doxygen, and Doxygen's own HTML is correct.
  • Plain text in the procedure titles. A title shows code and references as text, without markup.

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused implementation is consistent with RST parsing rules and includes appropriate regression coverage.

0 open findings

What changed in this PR

Improves Doxygen text rendering in needs cards by safely handling inline RST boundaries and keeping titles markup-free.

Changes:

  • Adds boundary-aware joining for inline RST markup.
  • Adds explicit plain-text extraction for need titles.
  • Adds regression tests for adjacent markup and links.
File Description
sphinx/​_scripts/​rst_builders.py Produces plain-text procedure titles.
sphinx/​_scripts/​doxygen_parser.py Handles inline markup boundaries and plain-text extraction.
sphinx/​_extensions/​_tests/​test_inline_markup.py Tests rendering and plain-text behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tobiaskaestner
tobiaskaestner force-pushed the tkaestner/rst-inline-markup branch from 35be9c5 to 8451de9 Compare October 13, 2026 19:06
@tobiaskaestner
tobiaskaestner removed this pull request from stack #15 October 13, 2026 19:09
@tobiaskaestner
tobiaskaestner added this pull request to stack #19 October 13, 2026 19:09
Base automatically changed from tkaestner/need-preview to main October 13, 2026 19:13
tobiaskaestner and others added 2 commits October 13, 2026 21:13
RST accepts inline markup only next to whitespace or some punctuation.
Doxygen prose often puts code or a link directly against other text:
"@p data_p[0..LIST_LEN-1]" gives a literal before "[", and
"K_MSGQ_DEFINE()d" a link before "d". Both are valid Doxygen, but the
RST showed the raw markup: in the Zephyr test specification, 93
"start-string without end-string" warnings.

para_text now puts an escaped space between such markup and its
neighbour. RST takes it as the boundary and removes it from the output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tobias Kaestner <tobias.kaestner@inovex.de>
A test procedure need takes its title from the brief, and a need title
is not parsed. The brief came from para_text as RST, so the title showed
the markup: "drain ``fifo2`` via ISR". para_text(plain=True) gives code
and references as their text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tobias Kaestner <tobias.kaestner@inovex.de>
@tobiaskaestner
tobiaskaestner force-pushed the tkaestner/rst-inline-markup branch from 8451de9 to 0416025 Compare October 13, 2026 19:13
@tobiaskaestner
tobiaskaestner merged commit 222438a into main Oct 13, 2026
2 checks passed
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