Skip to content

Commit 2e8f2ae

Browse files
author
logwolvy
committed
fix nil output name 'a' tags
1 parent b77ba6a commit 2e8f2ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/html2text.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ def wrap_link(node, output)
142142
end
143143

144144
if href.nil?
145-
if !name.nil?
146-
output = "[#{output}]"
145+
if !name.nil? && output.empty?
146+
output = nil
147147
end
148148
else
149149
href = href.to_s

0 commit comments

Comments
 (0)