Skip to content

Conversation

@reakaleek
Copy link
Member

@reakaleek reakaleek commented Jul 7, 2025

Closes #1523

Context

Only in some cases (depending on the content length) the RoleParser would parse incorrect content.

E.g. if the icon is {icon}`pencil`, contentSpan would result in pencil` (a trailing space and trailing backtick)

The previous fix to this problem was just to add .Trim() to the existing contentSpan.Trim('`').

But this caused the trailing space to also disappear in the final HTML output, which was reported in #1523.

image

Changes

Fix the logic to determine the closing backtick.

Preview

Here you can see that the space is now correctly rendered in the final html output.

image

@reakaleek reakaleek self-assigned this Jul 7, 2025
@reakaleek reakaleek added the fix label Jul 7, 2025
@reakaleek reakaleek marked this pull request as ready for review July 7, 2025 22:03
@reakaleek reakaleek requested a review from a team as a code owner July 7, 2025 22:03
@reakaleek reakaleek requested a review from a team as a code owner July 7, 2025 22:08
@github-actions
Copy link

github-actions bot commented Jul 7, 2025

🔍 Preview links for changed docs

@reakaleek reakaleek mentioned this pull request Jul 8, 2025
@reakaleek reakaleek merged commit 47e4d24 into main Jul 8, 2025
17 checks passed
@reakaleek reakaleek deleted the feature/fix-role-parser branch July 8, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

some inline icons need more padding

3 participants