Skip to content

Commit

Permalink
better url detection
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencohn authored and weissm committed Dec 5, 2023
1 parent 19fa49a commit 2f0f655
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OneMore/Models/Page.cs
Expand Up @@ -1253,8 +1253,8 @@ public XElement GetTextCursor(bool allowPageTitle = false)
// a zero-selection link and a partial or fully selected link. Note that XML
// comments are used to wrap mathML equations
if (cdata.Value.Length == 0 ||
Regex.IsMatch(cdata.Value, @"<a\s+href.+?</a>", RegexOptions.Singleline) ||
Regex.IsMatch(cdata.Value, @"<!--.+?-->", RegexOptions.Singleline))
Regex.IsMatch(cdata.Value, @"^<a\s+href.+?</a>$", RegexOptions.Singleline) ||
Regex.IsMatch(cdata.Value, @"^<!--.+?-->$", RegexOptions.Singleline))
{
SelectionScope = SelectionScope.Empty;
SelectionSpecial = cdata.Value.Length > 0;
Expand Down

0 comments on commit 2f0f655

Please sign in to comment.