Skip to content

Commit

Permalink
Handle formatting, added en-dash and em-dash handling
Browse files Browse the repository at this point in the history
Signed-off-by: Sandy <sandy@sandyuraz.com>
  • Loading branch information
thecsw committed Mar 20, 2023
1 parent 48011a9 commit 7966b76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion export/html/formatting.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ import (
// quotesReplace is the map to replace
var quotesReplace = map[string]string{
"'s": "’s",
"s'": "s’",
"'m": "’m",
"n't": "n’t",
"'re": "’re",
"'ve": "’ve",
"'ll": "’ll",
"``": "β€œ",
"''": "”",
"--": "β€”",
"--": "–", // en dash
"---": "β€”", // em dash
}

// fancyQuotes replaces boring single and double quotes with fancier Unicode versions
Expand Down
2 changes: 1 addition & 1 deletion yunyun/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const (
darknessPunctLeft = `[()\[\]_%>β€œβ€]`
// darknessPunctRight is our alternative to [[:punct:]] re2
// class for matching right punctuation symbols.
darknessPunctRight = `[()\[\],.!?:;&_%<β€œβ€]`
darknessPunctRight = `[()\[\],.!?:;&_%<β€œβ€β€™]`
)

// SymmetricEmphasis is a useful tool to create simple text markups.
Expand Down

0 comments on commit 7966b76

Please sign in to comment.