From dcc63a8ead1c8671502624ca4e557fe1a7b41703 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Sat, 9 Dec 2017 01:11:00 +0530 Subject: [PATCH] FIX: Keep all the indenting in the text --- lib/html_to_markdown.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/html_to_markdown.rb b/lib/html_to_markdown.rb index d21179b708c..a27814b4e70 100644 --- a/lib/html_to_markdown.rb +++ b/lib/html_to_markdown.rb @@ -210,7 +210,7 @@ class HtmlToMarkdown def visit_text(node) node.content = node.content.gsub(/\A[[:space:]]+/, "") if node.previous_element.nil? && EMPHASIS.include?(node.parent.name) - @stack[-1].markdown << node.text.gsub(/\s{2,}/, " ") + @stack[-1].markdown << node.text end def format_block