mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-03 06:22:25 -06:00
[chore]: Bump github.com/yuin/goldmark from 1.5.5 to 1.5.6 (#2140)
This commit is contained in:
parent
1e2db7a32f
commit
36dceac56c
37 changed files with 1872 additions and 1694 deletions
11
vendor/github.com/yuin/goldmark/parser/attribute.go
generated
vendored
11
vendor/github.com/yuin/goldmark/parser/attribute.go
generated
vendored
|
|
@ -12,7 +12,7 @@ import (
|
|||
var attrNameID = []byte("id")
|
||||
var attrNameClass = []byte("class")
|
||||
|
||||
// An Attribute is an attribute of the markdown elements
|
||||
// An Attribute is an attribute of the markdown elements.
|
||||
type Attribute struct {
|
||||
Name []byte
|
||||
Value interface{}
|
||||
|
|
@ -93,7 +93,8 @@ func parseAttribute(reader text.Reader) (Attribute, bool) {
|
|||
// CommonMark is basically defined for XHTML(even though it is legacy).
|
||||
// So we restrict id characters.
|
||||
for ; i < len(line) && !util.IsSpace(line[i]) &&
|
||||
(!util.IsPunct(line[i]) || line[i] == '_' || line[i] == '-' || line[i] == ':' || line[i] == '.'); i++ {
|
||||
(!util.IsPunct(line[i]) || line[i] == '_' ||
|
||||
line[i] == '-' || line[i] == ':' || line[i] == '.'); i++ {
|
||||
}
|
||||
name := attrNameClass
|
||||
if c == '#' {
|
||||
|
|
@ -145,7 +146,7 @@ func parseAttributeValue(reader text.Reader) (interface{}, bool) {
|
|||
reader.SkipSpaces()
|
||||
c := reader.Peek()
|
||||
var value interface{}
|
||||
ok := false
|
||||
var ok bool
|
||||
switch c {
|
||||
case text.EOF:
|
||||
return Attribute{}, false
|
||||
|
|
@ -244,7 +245,7 @@ func scanAttributeDecimal(reader text.Reader, w io.ByteWriter) {
|
|||
for {
|
||||
c := reader.Peek()
|
||||
if util.IsNumeric(c) {
|
||||
w.WriteByte(c)
|
||||
_ = w.WriteByte(c)
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
|
@ -286,7 +287,7 @@ func parseAttributeNumber(reader text.Reader) (float64, bool) {
|
|||
}
|
||||
scanAttributeDecimal(reader, &buf)
|
||||
}
|
||||
f, err := strconv.ParseFloat(buf.String(), 10)
|
||||
f, err := strconv.ParseFloat(buf.String(), 64)
|
||||
if err != nil {
|
||||
return 0, false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue