Skip to content

Commit

Permalink
Add fancy quotes as corners for formatting regex
Browse files Browse the repository at this point in the history
Signed-off-by: Sandy <sandy@sandyuraz.com>
  • Loading branch information
thecsw committed Dec 25, 2022
1 parent 5ecd253 commit c7d53d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yunyun/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func RemoveFormatting(what string) string {
// MarkupRegex is a useful tool to create simple text markups.
func MarkupRegex(delimeter string) *regexp.Regexp {
return regexp.MustCompile(
`(?mU)(?P<l>^|[ ()\[\]_%>])` + delimeter +
`(?mU)(?P<l>^|[ ()\[\]_%>“”])` + delimeter +
`(?P<text>\S|\S\S|\S.+\S)` + delimeter +
`(?P<r>$|[ ()\[\],.!?:;&_%<“”])`)
}

0 comments on commit c7d53d5

Please sign in to comment.