summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcommonmark.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/commonmark.rb b/commonmark.rb
index 8767c04..f52f082 100755
--- a/commonmark.rb
+++ b/commonmark.rb
@@ -166,7 +166,7 @@ class Renderer
end
def blocksep
- self.out("\n\n")
+ self.out("\n")
end
def containersep
@@ -287,7 +287,7 @@ class HtmlRenderer < Renderer
def link(node)
self.out('<a href="', URI.escape(node.url), '"')
- if node.title
+ if node.title && node.title.length > 0
self.out(' title="', CGI.escapeHTML(node.title), '"')
end
self.out('>', node.children, '</a>')
@@ -295,7 +295,7 @@ class HtmlRenderer < Renderer
def image(node)
self.out('<img src="', URI.escape(node.url), '"')
- if node.title
+ if node.title && node.title.length > 0
self.out(' title="', CGI.escapeHTML(node.title), '"')
end
plain do