all repos — grayfriday @ 491d67f02d073ef1ec299862da7374bb95adce18

blackfriday fork with a few changes

En-dashes only between numbers
Anirudh Oppiliappan x@icyphox.sh
Sun, 19 Jun 2022 19:33:13 +0530
commit

491d67f02d073ef1ec299862da7374bb95adce18

parent

f5892105afdc5ff17ccb1e9790fac094383e5cda

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M smartypants.gosmartypants.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 }