diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-07 16:15:35 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-07 16:15:35 +0300 |
commit | 4f629dab2a14c190b641bd709c28ebdad5b7a062 (patch) | |
tree | 00035d114b896a38b4a2a6ac835411ba36d3e1e5 /app/helpers/gitlab_markdown_helper.rb | |
parent | 48837850838c8acb0c02ae60b29e18d287865878 (diff) | |
parent | 0611a18964a998b6edc81ef9b469f9f70430e542 (diff) |
Merge branch 'master' into rs-redactor-filter
Diffstat (limited to 'app/helpers/gitlab_markdown_helper.rb')
-rw-r--r-- | app/helpers/gitlab_markdown_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index 0d175e1ea18..40161c5a641 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -21,7 +21,7 @@ module GitlabMarkdownHelper gfm_body = Gitlab::Markdown.gfm(escaped_body, project: @project, current_user: current_user) - fragment = Nokogiri::XML::DocumentFragment.parse(gfm_body) + fragment = Nokogiri::HTML::DocumentFragment.parse(gfm_body) if fragment.children.size == 1 && fragment.children[0].name == 'a' # Fragment has only one node, and it's a link generated by `gfm`. # Replace it with our requested link. @@ -171,7 +171,7 @@ module GitlabMarkdownHelper # and return true. Otherwise return false. def truncate_if_block(node, truncated) if node.element? && node.description.block? && !truncated - node.content = "#{node.content}..." if node.next_sibling + node.inner_html = "#{node.inner_html}..." if node.next_sibling true else truncated |