summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gomarkdown/markdown/parser/block.go
diff options
context:
space:
mode:
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
}