Escape leading Markdown block markers in {{< ui >}} shortcode - #39970
Open
hestonhoffman wants to merge 1 commit into
Open
hestonhoffman wants to merge 1 commit into
hestonhoffman wants to merge 1 commit into
Conversation
The ui shortcode pipes its label through markdownify, so a label starting with +, -, *, #, or > was parsed as a list, heading, or blockquote instead of text. The shortcode now escapes the marker itself and strips any escape an author already added, so both "+ Add" and "\+ Add" render the same. Removes the now-redundant escapes from content/en. Translated content keeps working unedited because both forms are accepted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
hestonhoffman
marked this pull request as ready for review
September 15, 2026 20:11
Contributor
|
Contributor
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.
What does this PR do? What is the motivation?
The
{{< ui >}}shortcode pipes its label throughmarkdownify. A label starting with+,-,*,#, or>was parsed as a list, heading, or blockquote instead of text, so it rendered mangled.The shortcode now escapes the marker itself, and strips an escape an author already added, so
+ Addand\+ Addrender the same. This also fixes several> Viewslabels that were broken but unreported.Redundant
\+escapes are removed fromcontent/en. Translated content is not edited and keeps working, because both forms are accepted.Related to #39966, which fixes the same
+issue at the call sites.Preview links
+renders as+(escape removed in this PR)+renders as+(escape removed in this PR)> Viewsrenders as text, not a blockquote (was broken)> Viewsrenders as text, not a blockquote (was broken)</>icon renders unchanged</>icon renders unchanged\+in source, renders as+Merge readiness
AI assistance
Used Claude Code to identify the affected markers, update the shortcode, and remove the redundant escapes.