En-dashes only between numbers
Anirudh Oppiliappan x@icyphox.sh
Sun, 19 Jun 2022 19:33:13 +0530
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
smartypants.go
→
smartypants.go
@@ -202,7 +202,7 @@ }
func (r *SPRenderer) smartEnDash(out *bytes.Buffer, previousChar byte, text []byte) int { if len(text) >= 2 { - if wordBoundary(previousChar) && wordBoundary(text[1]) { + if isdigit(previousChar) && isdigit(text[1]) { out.WriteString("–") return 0 }