htmlElementsCollector.go (hugo-0.80.0) | : | htmlElementsCollector.go (hugo-0.81.0) | ||
---|---|---|---|---|
skipping to change at line 152 | skipping to change at line 152 | |||
// The net/html parser does not handle single table elements as input, e.g. tbod y. | // The net/html parser does not handle single table elements as input, e.g. tbod y. | |||
// We only care about the element/class/ids, so just store away the original tag name | // We only care about the element/class/ids, so just store away the original tag name | |||
// and pretend it's a <div>. | // and pretend it's a <div>. | |||
func (c *cssClassCollectorWriter) insertStandinHTMLElement(el string) (string, s tring) { | func (c *cssClassCollectorWriter) insertStandinHTMLElement(el string) (string, s tring) { | |||
tag := el[1:] | tag := el[1:] | |||
spacei := strings.Index(tag, " ") | spacei := strings.Index(tag, " ") | |||
if spacei != -1 { | if spacei != -1 { | |||
tag = tag[:spacei] | tag = tag[:spacei] | |||
} | } | |||
tag = strings.Trim(tag, "\n ") | ||||
newv := strings.Replace(el, tag, "div", 1) | newv := strings.Replace(el, tag, "div", 1) | |||
return newv, strings.ToLower(tag) | return newv, strings.ToLower(tag) | |||
} | } | |||
func (c *cssClassCollectorWriter) endCollecting(drop bool) { | func (c *cssClassCollectorWriter) endCollecting(drop bool) { | |||
c.isCollecting = false | c.isCollecting = false | |||
c.inQuote = false | c.inQuote = false | |||
c.dropValue = drop | c.dropValue = drop | |||
} | } | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added |