mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Fixes #121
This commit is contained in:
parent
12fc98ebcd
commit
54b1e988cc
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
// Convert normal apostrophes. This is probably more flexible than necessary but
|
||||||
// converts any apostrophe in between two alphanumerics.
|
// 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 := gast.NewString(s.Substitutions[Apostrophe])
|
||||||
node.SetCode(true)
|
node.SetCode(true)
|
||||||
block.Advance(1)
|
block.Advance(1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue