mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Remove other whitespaces except the line intents
This commit is contained in:
parent
b3bdc68639
commit
6b3aa81c11
@ -210,7 +210,9 @@ class HtmlToMarkdown
|
|||||||
|
|
||||||
def visit_text(node)
|
def visit_text(node)
|
||||||
node.content = node.content.gsub(/\A[[:space:]]+/, "") if node.previous_element.nil? && EMPHASIS.include?(node.parent.name)
|
node.content = node.content.gsub(/\A[[:space:]]+/, "") if node.previous_element.nil? && EMPHASIS.include?(node.parent.name)
|
||||||
@stack[-1].markdown << node.text
|
indent = node.text[/^\s+/] || ""
|
||||||
|
text = node.text.gsub(/^\s+/, "").gsub(/\s{2,}/, " ")
|
||||||
|
@stack[-1].markdown << [indent, text].join("")
|
||||||
end
|
end
|
||||||
|
|
||||||
def format_block
|
def format_block
|
||||||
|
Loading…
Reference in New Issue
Block a user