Skip to content

Commit

Permalink
allow single digit hashtags (#1596)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencohn authored Sep 30, 2024
1 parent 21157bc commit 2519c9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OneMore/Commands/Tagging/HashtagPageScannerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public HashtagPageSannerFactory(XElement styleTemplate, bool unfiltered)
// Groups[1].Index, Length, Value
// matches ##digits or ##word or #word, but not #digits
hashPattern = new Regex(unfiltered
? @"(?:^|\s|\[|\(|{)(##\d[\w\-_]+|#{1,2}[^\W\d][\w\-_]{0,})"
: @"(?:^|\s|\[|\(|{)(##\d[\w\-_]+|(?!#(?:[A-Fa-f0-9]{6}|define|else|endif|endregion|error|include|if|ifdef|ifndef|line|pragma|region|undef)(?:\s|$|\)|\]|}|[^\w\d\-_]))#{1,2}[^\W\d][\w\-_]{0,})"
? @"(?:^|\s|\[|\(|{)(##\d[\w\-_]{0,}|#{1,2}[^\W\d][\w\-_]{0,})"
: @"(?:^|\s|\[|\(|{)(##\d[\w\-_]{0,}|(?!#(?:[A-Fa-f0-9]{6}|define|else|endif|endregion|error|include|if|ifdef|ifndef|line|pragma|region|undef)(?:\s|$|\)|\]|}|[^\w\d\-_]))#{1,2}[^\W\d][\w\-_]{0,})"
);

this.styleTemplate = styleTemplate;
Expand Down

0 comments on commit 2519c9e

Please sign in to comment.