Repository navigation
markdown: Allow inline-block styles on spans - #336133
Merged
Alexandru Dima (alexdima) merged 2 commits intoSep 14, 2026
Merged
Conversation
Preserve display:inline-block on sanitized span elements using the current sanitizer architecture, with focused regression coverage. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The narrowly scoped sanitizer change matches the stated behavior and includes appropriate positive and negative coverage.
Review tier: Balanced
Findings: None
What changed in this PR
Allows sanitized Markdown <span> elements to retain the safe display:inline-block style.
Changes:
- Adds
display:inline-blockto the style allowlist. - Tests preservation of
inline-blockand removal ofblock.
| File | Description |
|---|---|
src/vs/base/browser/markdownRenderer.ts |
Extends span style sanitization. |
src/vs/base/test/browser/markdownRenderer.test.ts |
Adds focused sanitizer coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Alexandru Dima (alexdima)
marked this pull request as ready for review
September 14, 2026 11:01
Alexandru Dima (alexdima)
enabled auto-merge
September 14, 2026 11:01
Giuseppe Cianci (Giuspepe)
approved these changes
Sep 14, 2026
Alexandru Dima (alexdima)
deleted the
agents/markdown-renderer-merge-conflict-fix
branch
September 14, 2026 11:03
Contributor
|
Thank you so much Alexandru! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
display:inline-blockon sanitized<span>elementsdomSanitizesanitizer architectureinline-blockwhile strippingdisplay:blockAttribution
This incorporates the original work from #180498 by Yoav Balasiano (@yoavbls). The exact original commit,
6a26c24dccf45de6b770297ed2c48e315de4682f, is retained in the branch history as a parent of the adaptation merge commit.Testing
npm run compile./scripts/test.sh --run src/vs/base/test/browser/markdownRenderer.test.ts --grep "Only allows inline-block display style on spans"Closes #180496