aboutsummaryrefslogtreecommitdiff
path: root/mardown/ast_quote.go
diff options
context:
space:
mode:
Diffstat (limited to 'mardown/ast_quote.go')
-rw-r--r--mardown/ast_quote.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/mardown/ast_quote.go b/mardown/ast_quote.go
index 5ed1208..d673f61 100644
--- a/mardown/ast_quote.go
+++ b/mardown/ast_quote.go
@@ -30,7 +30,10 @@ func (a *astQuote) Eval() (template.HTML, error) {
source += ct
}
source = template.HTML(strings.TrimSpace(string(source)))
- return template.HTML(fmt.Sprintf(`<div class="quote">%s<p>%s</p></div>`, quote, source)), nil
+ if len(source) > 0 {
+ return template.HTML(fmt.Sprintf(`<div class="quote">%s<p>%s</p></div>`, quote, source)), nil
+ }
+ return template.HTML(fmt.Sprintf(`<div class="quote">%s</div>`, quote)), nil
}
func quote(lxs *lexers) (*astQuote, error) {