diff options
author | Wim <wim@42.be> | 2020-09-04 23:29:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 23:29:13 +0200 |
commit | 2f59abdda7a1072036ea1fdb4c859cccbb56efa6 (patch) | |
tree | e35393f23d12783ae92f0469085efc7dec953f82 /vendor/github.com/gomarkdown | |
parent | 17747a5c8893fd47ba8eb61dd10477170640caf6 (diff) | |
download | matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.gz matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.bz2 matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.zip |
Update vendor (#1228)
Diffstat (limited to 'vendor/github.com/gomarkdown')
-rw-r--r-- | vendor/github.com/gomarkdown/markdown/README.md | 2 | ||||
-rw-r--r-- | vendor/github.com/gomarkdown/markdown/go.sum | 1 | ||||
-rw-r--r-- | vendor/github.com/gomarkdown/markdown/parser/block.go | 33 |
3 files changed, 23 insertions, 13 deletions
diff --git a/vendor/github.com/gomarkdown/markdown/README.md b/vendor/github.com/gomarkdown/markdown/README.md index 31ebb600..5488280c 100644 --- a/vendor/github.com/gomarkdown/markdown/README.md +++ b/vendor/github.com/gomarkdown/markdown/README.md @@ -113,7 +113,7 @@ opts := html.RendererOptions{ } renderer := html.NewRenderer(opts) md := "test\n```\nthis code block will be dropped from output\n```\ntext" -html := markdown.ToHTML([]byte(s), nil, renderer) +html := markdown.ToHTML([]byte(md), nil, renderer) ```` ## Sanitize untrusted content diff --git a/vendor/github.com/gomarkdown/markdown/go.sum b/vendor/github.com/gomarkdown/markdown/go.sum new file mode 100644 index 00000000..1406b01f --- /dev/null +++ b/vendor/github.com/gomarkdown/markdown/go.sum @@ -0,0 +1 @@ +golang.org/dl v0.0.0-20190829154251-82a15e2f2ead/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ= 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 } |