summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gomarkdown/markdown/parser/block.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-09-04 23:29:13 +0200
committerGitHub <noreply@github.com>2020-09-04 23:29:13 +0200
commit2f59abdda7a1072036ea1fdb4c859cccbb56efa6 (patch)
treee35393f23d12783ae92f0469085efc7dec953f82 /vendor/github.com/gomarkdown/markdown/parser/block.go
parent17747a5c8893fd47ba8eb61dd10477170640caf6 (diff)
downloadmatterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.gz
matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.bz2
matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.zip
Update vendor (#1228)
Diffstat (limited to 'vendor/github.com/gomarkdown/markdown/parser/block.go')
-rw-r--r--vendor/github.com/gomarkdown/markdown/parser/block.go33
1 files changed, 21 insertions, 12 deletions
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
}