Skip to content

Commit

Permalink
Fixes #121
Browse files Browse the repository at this point in the history
  • Loading branch information
yuin committed Apr 13, 2020
1 parent 12fc98e commit 54b1e98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extension/typographer.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (s *typographerParser) Parse(parent gast.Node, block text.Reader, pc parser
}
// Convert normal apostrophes. This is probably more flexible than necessary but
// converts any apostrophe in between two alphanumerics.
if len(line) > 1 && (unicode.IsDigit(before) || unicode.IsLetter(before)) && (util.IsAlphaNumeric(line[1])) {
if len(line) > 1 && (unicode.IsDigit(before) || unicode.IsLetter(before)) && (unicode.IsLetter(util.ToRune(line, 1))) {
node := gast.NewString(s.Substitutions[Apostrophe])
node.SetCode(true)
block.Advance(1)
Expand Down

0 comments on commit 54b1e98

Please sign in to comment.