Skip to content

MudHighlighter: Maintain markup formatting when Markup=true#11705

Merged
ScarletKuro merged 5 commits intoMudBlazor:devfrom
Anu6is:11593-MudHighlighter
Jul 26, 2025
Merged

MudHighlighter: Maintain markup formatting when Markup=true#11705
ScarletKuro merged 5 commits intoMudBlazor:devfrom
Anu6is:11593-MudHighlighter

Conversation

@Anu6is
Copy link
Contributor

@Anu6is Anu6is commented Jul 25, 2025

Use string builder to compile the output string instead of using the render fragment builder, since calling AddMarkupContent caused unexpected results. It automatically adds a closing tag if the string provided did not contain one.

Updated all markup tests to correctly capture the component behavior.

Closes #11593

Highlighter.mp4

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the style of this project.
  • I've added relevant tests or tested on existing ones.

@codecov
Copy link

codecov bot commented Jul 25, 2025

Codecov Report

❌ Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.29%. Comparing base (86f0de2) to head (8175c4f).
⚠️ Report is 4 commits behind head on dev.

Files with missing lines Patch % Lines
...Blazor/Components/Highlighter/MudHighlighter.razor 68.42% 3 Missing and 3 partials ⚠️

❌ Your patch status has failed because the patch coverage (68.42%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #11705      +/-   ##
==========================================
- Coverage   91.35%   91.29%   -0.06%     
==========================================
  Files         466      466              
  Lines       14697    14675      -22     
  Branches     2853     2860       +7     
==========================================
- Hits        13426    13398      -28     
- Misses        632      635       +3     
- Partials      639      642       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Anu6is Anu6is marked this pull request as draft July 25, 2025 17:01
@sonarqubecloud
Copy link

@Anu6is Anu6is marked this pull request as ready for review July 25, 2025 18:00
@Anu6is Anu6is requested a review from ScarletKuro July 26, 2025 12:25
@ScarletKuro ScarletKuro merged commit 0414900 into MudBlazor:dev Jul 26, 2025
5 of 6 checks passed
@Yomodo
Copy link
Contributor

Yomodo commented Jul 26, 2025

@Anu6is Awesome, thank you!

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.

MudHighlighter: Markup=true doesn't show html markup anymore

3 participants