Repository navigation
Nest multi-line return values under the "- Returns: " field - #4023
Merged
Merged
Conversation
Follow-up to #4021, found by building the Lite SDK archive for real. iris_doc writes the return value after "- Returns: " on the same line, so the Markdown list #4021 introduced collided with it. DocC absorbed the first item into the Returns line and dropped the rest into the discussion: Return Value : "- 0: Success." rendered as prose, dash and all Discussion : < 0: Failure. orphaned, in the wrong section 55 pages in the Lite archive were affected and none were correct, which is worse than the single-line output it replaced. indent_for_inline_field() starts a multi-line value on the next line and indents it two spaces, so it nests under the field instead of escaping it: "\n - 0: Success.\n - < 0: Failure." Three rules in replace_newline() were silently undoing that -- two stripping a leading newline after ': "', and one collapsing the indent. They now take the platform and keep a deliberate newline plus two-space indent only for the Markdown platforms; every other platform keeps the original patterns verbatim. That matters because replace_newline() runs for every platform, unlike the #4021 changes which were gated behind MARKDOWN_PLATFORMS. A first attempt that applied the exceptions unconditionally shifted unity, flutter, rn and electron by 11-68 bytes. Verified by regenerating against en-US/dita/RTC-NG: unity, flutter, rn, electron byte-identical to master ios 461 of 461 multi-line returns now nested (0 before) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #4021, found by building the Lite SDK archive for real rather than inspecting the template.
The problem
iris_docwrites the return value after- Returns:on the same line, so the Markdown list #4021 introduced collided with it:What DocC produced for
pauseAllChannelMediaRelay():- 0: Success.— literal dash, rendered as prose< 0: Failure.— orphaned into the wrong section55 pages in the Lite archive were affected, 0 correct. That's worse than the single-line output it replaced, so this should land before any archive is published.
The fix
indent_for_inline_field()starts a multi-line value on the next line, indented two spaces, so it nests under the field rather than escaping it:Three rules in
replace_newline()were silently undoing this — two stripping a leading newline after: "(there are duplicates), and one collapsing the indent. They now takeplatform_tagand keep a deliberate newline-plus-indent only for the Markdown platforms.That gating matters:
replace_newline()runs for every platform, unlike the #4021 changes which sat behindMARKDOWN_PLATFORMS. A first attempt applying the exceptions unconditionally shifted unity, flutter, rn and electron by 11–68 bytes. Non-Markdown platforms now use the original patterns verbatim, so they can't drift by construction.Verification
Regenerated against
en-US/dita/RTC-NG:How this was found
Dispatching
deploy_docs.ymlonAgoraLite_iOSproduced a real archive. The discussion improvements from #4021 all worked — 34 asides, 76 lists, 93 sub-headings, where the live archive has none — confirming Markdown survivesiris_doc→xcodebuild→ DocC. The return values were the one thing that broke, and only a real build could show it.No release assets were touched; the stale 4.7.0 archives are still in place.
🤖 Generated with Claude Code