Skip to content

Fix HumanizeHrefTags not working when see tag spans over multiple lines #3435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Focus1337
Copy link
Contributor

Pull Request

The issue or feature being addressed

Fixes #3419

Details on the issue fix or feature implementation

Updated pattern

private const string HrefPattern = @"<see\s+href=\""([^""]*)\"">\s*(.*?)\s*<\/see>";

\s+href= to account for optional whitespace (e.g., <see href=)
non-greedy .*? and \s* trims leading/trailing whitespace (e.g., newlines)
RegexOptions.Singleline to allow . to match line breaks.

Copy link

codecov bot commented Jun 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.55%. Comparing base (3390173) to head (b38cb0b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3435   +/-   ##
=======================================
  Coverage   93.55%   93.55%           
=======================================
  Files         110      110           
  Lines        3834     3834           
  Branches      719      719           
=======================================
  Hits         3587     3587           
  Misses        247      247           
Flag Coverage Δ
Linux 93.55% <ø> (ø)
Windows 93.55% <ø> (ø)
macOS 93.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martincostello martincostello added this to the v8.1.3 milestone Jun 3, 2025
@martincostello martincostello merged commit b28e9c8 into domaindrivendev:master Jun 3, 2025
11 checks passed
@martincostello
Copy link
Collaborator

Thanks!

@Focus1337 Focus1337 deleted the fix-issue-3419-HumanizeHrefTags branch June 13, 2025 20:14
This was referenced Jul 28, 2025
This was referenced Aug 7, 2025
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.

[Bug]: HumanizeHrefTags not working when see tag spans over multiple lines
2 participants