Skip to content

Conversation

@Anu6is
Copy link
Contributor

@Anu6is Anu6is commented Jun 23, 2025

Description

When Markup is enabled, if the highlight text is found within an html markup element, the markup rendering breaks and reverts to raw html. This fix excludes html tags from the highlighting process so as to avoid incorrectly inserting the <mark> tag into valid html elements.

Resolves: #10247
Resolves: #8196

How Has This Been Tested?

Visually and unit tests

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Checklist

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

@github-actions github-actions bot added the bug Unexpected behavior or functionality not working as intended label Jun 23, 2025
@codecov
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

Attention: Patch coverage is 91.32653% with 17 lines in your changes missing coverage. Please review.

Project coverage is 91.18%. Comparing base (6027cf9) to head (b0ddd99).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
src/MudBlazor/Components/Highlighter/Splitter.cs 92.64% 5 Missing and 5 partials ⚠️
...Blazor/Components/Highlighter/MudHighlighter.razor 90.38% 2 Missing and 3 partials ⚠️
...zor/Components/Highlighter/MudHighlighter.razor.cs 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #11543      +/-   ##
==========================================
+ Coverage   91.17%   91.18%   +0.01%     
==========================================
  Files         466      466              
  Lines       14499    14652     +153     
  Branches     2815     2847      +32     
==========================================
+ Hits        13220    13361     +141     
- Misses        642      646       +4     
- Partials      637      645       +8     

☔ 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 June 23, 2025 15:19
@Anu6is Anu6is marked this pull request as ready for review June 23, 2025 15:48
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MudHighlighter - unexpected behavior with markup and quotes or other html markups MudHighlighter will move text out from p tag

2 participants