Skip to content

[WIP] Fix HTML indentation issue in Callout component - #1693

Draft
runnabro wants to merge 3 commits into
nextfrom
copilot/rm-19815-fix-html-indentation-issue
Draft

runnabro wants to merge 3 commits into
nextfrom
copilot/rm-19815-fix-html-indentation-issue

Conversation

@runnabro

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Fix Linear issue RM-19815 https://linear.app/readme-io/issue/RM-19815 . HTML inside component bodies (Callout, Tab, etc.) retains the body's 2-space indent in rich mode. Repro: \n Some text\n. Expected html value ' Some text', actual two leading spaces. Also happens for later HTML lines, e.g. paragraph Hello followed by blank line and '

x
' in Callout. Investigate processor/transform/mdxish/components/mdx-blocks.ts parsing, safeDeindent, and processor/compile/html.ts. Issue investigation suggests first-line regression from PR #1583/feed88fe6 replacing trim() with trimBlankEdges; later lines preexisting, more visible following #1692. Treat these as hypotheses to verify. Proposed fix normalize html indentation after parseMdChildren, with correct source positions, and remove serializer trimStart workaround only if appropriate. Do not change safeDeindent's 4-column gate: mixed component/HTML content depends on whitespace. Preserve meaningful HTML internal indentation and nested/list behavior. Add regression tests for comments, HTML after paragraphs, components and lists. Follow repository instructions and PR template. Inspect code history/authorship (especially #1583 and #1692) to identify a clear responsible owner and request their review when supported; otherwise record that no clear owner was found. Open a PR linked to RM-19815. Do not post Linear comments or change issue properties.

runnabro and others added 2 commits November 19, 2026 04:25
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

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.

2 participants