mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-03 13:20:28 +00:00
Update Goldmark v1.1.25 -> v1.1.32 (#12048)
This commit is contained in:
parent
c86478ec47
commit
9ef2f62a79
10 changed files with 85 additions and 26 deletions
2
vendor/github.com/yuin/goldmark/util/util.go
generated
vendored
2
vendor/github.com/yuin/goldmark/util/util.go
generated
vendored
|
@ -268,7 +268,7 @@ func FindClosure(bs []byte, opener, closure byte, codeSpan, allowNesting bool) i
|
|||
if codeSpanCloser == codeSpanOpener {
|
||||
codeSpanOpener = 0
|
||||
}
|
||||
} else if c == '\\' && i < len(bs)-1 && IsPunct(bs[i+1]) {
|
||||
} else if codeSpanOpener == 0 && c == '\\' && i < len(bs)-1 && IsPunct(bs[i+1]) {
|
||||
i += 2
|
||||
continue
|
||||
} else if codeSpan && codeSpanOpener == 0 && c == '`' {
|
||||
|
|
2
vendor/github.com/yuin/goldmark/util/util_safe.go
generated
vendored
2
vendor/github.com/yuin/goldmark/util/util_safe.go
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
// +build appengine,js
|
||||
// +build appengine js
|
||||
|
||||
package util
|
||||
|
||||
|
|
9
vendor/github.com/yuin/goldmark/util/util_unsafe.go
generated
vendored
9
vendor/github.com/yuin/goldmark/util/util_unsafe.go
generated
vendored
|
@ -13,8 +13,11 @@ func BytesToReadOnlyString(b []byte) string {
|
|||
}
|
||||
|
||||
// StringToReadOnlyBytes returns bytes converted from given string.
|
||||
func StringToReadOnlyBytes(s string) []byte {
|
||||
func StringToReadOnlyBytes(s string) (bs []byte) {
|
||||
sh := (*reflect.StringHeader)(unsafe.Pointer(&s))
|
||||
bh := reflect.SliceHeader{Data: sh.Data, Len: sh.Len, Cap: sh.Len}
|
||||
return *(*[]byte)(unsafe.Pointer(&bh))
|
||||
bh := (*reflect.SliceHeader)(unsafe.Pointer(&bs))
|
||||
bh.Data = sh.Data
|
||||
bh.Cap = sh.Len
|
||||
bh.Len = sh.Len
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue