1
0
Fork 0
forked from forgejo/forgejo

Vendor update: github.com/yuin/goldmark v1.2.1 (#12377)

Thanks to @yuin

fix #12376
This commit is contained in:
赵智超 2020-07-31 00:27:23 +08:00 committed by GitHub
parent 1f12dc8e88
commit 7e96268fb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 233 additions and 39 deletions

View file

@ -3,7 +3,6 @@ package parser
import (
"fmt"
"strings"
"unicode"
"github.com/yuin/goldmark/ast"
"github.com/yuin/goldmark/text"
@ -128,10 +127,10 @@ func ScanDelimiter(line []byte, before rune, min int, processor DelimiterProcess
}
canOpen, canClose := false, false
beforeIsPunctuation := unicode.IsPunct(before)
beforeIsWhitespace := unicode.IsSpace(before)
afterIsPunctuation := unicode.IsPunct(after)
afterIsWhitespace := unicode.IsSpace(after)
beforeIsPunctuation := util.IsPunctRune(before)
beforeIsWhitespace := util.IsSpaceRune(before)
afterIsPunctuation := util.IsPunctRune(after)
afterIsWhitespace := util.IsSpaceRune(after)
isLeft := !afterIsWhitespace &&
(!afterIsPunctuation || beforeIsWhitespace || beforeIsPunctuation)