From 2f59abdda7a1072036ea1fdb4c859cccbb56efa6 Mon Sep 17 00:00:00 2001 From: Wim Date: Fri, 4 Sep 2020 23:29:13 +0200 Subject: Update vendor (#1228) --- .../github.com/gomarkdown/markdown/parser/block.go | 33 ++++++++++++++-------- 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'vendor/github.com/gomarkdown/markdown/parser/block.go') diff --git a/vendor/github.com/gomarkdown/markdown/parser/block.go b/vendor/github.com/gomarkdown/markdown/parser/block.go index 3b0c391a..a0b80991 100644 --- a/vendor/github.com/gomarkdown/markdown/parser/block.go +++ b/vendor/github.com/gomarkdown/markdown/parser/block.go @@ -26,8 +26,10 @@ var ( blockTags = map[string]struct{}{ "blockquote": {}, "del": {}, + "dd": {}, "div": {}, "dl": {}, + "dt": {}, "fieldset": {}, "form": {}, "h1": {}, @@ -36,23 +38,28 @@ var ( "h4": {}, "h5": {}, "h6": {}, - "iframe": {}, - "ins": {}, - "math": {}, - "noscript": {}, - "ol": {}, - "pre": {}, - "p": {}, - "script": {}, - "style": {}, - "table": {}, - "ul": {}, + // TODO: technically block but breaks Inline HTML (Simple).text + //"hr": {}, + "iframe": {}, + "ins": {}, + "li": {}, + "math": {}, + "noscript": {}, + "ol": {}, + "pre": {}, + "p": {}, + "script": {}, + "style": {}, + "table": {}, + "ul": {}, // HTML5 "address": {}, "article": {}, "aside": {}, "canvas": {}, + "details": {}, + "dialog": {}, "figcaption": {}, "figure": {}, "footer": {}, @@ -230,8 +237,10 @@ func (p *Parser) block(data []byte) { // or // ______ if p.isHRule(data) { - p.addBlock(&ast.HorizontalRule{}) i := skipUntilChar(data, 0, '\n') + hr := ast.HorizontalRule{} + hr.Literal = bytes.Trim(data[:i], " \n") + p.addBlock(&hr) data = data[i:] continue } -- cgit v1.2.3