diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-17 09:11:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-17 09:11:44 +0000 |
commit | e750680e89a6f98803709c172943962741eeb9e7 (patch) | |
tree | d3e28a3692460fb37c4891d646220d06e68dfa3d /lib/kramdown | |
parent | a17e8b168778e5a107928671fd2829ab284e612d (diff) | |
download | gitlab-ce-e750680e89a6f98803709c172943962741eeb9e7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/kramdown')
-rw-r--r-- | lib/kramdown/converter/commonmark.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/kramdown/converter/commonmark.rb b/lib/kramdown/converter/commonmark.rb index 4abb34cc008..33ec9dd1fbc 100644 --- a/lib/kramdown/converter/commonmark.rb +++ b/lib/kramdown/converter/commonmark.rb @@ -34,7 +34,7 @@ module Kramdown def convert_codeblock(el, _opts) # Although tildes are supported in CommonMark, backticks are more common "```#{el.options[:lang]}\n" + - el.value.split(/\n/).map {|l| l.empty? ? "" : "#{l}" }.join("\n") + + el.value.split(/\n/).map { |l| l.empty? ? "" : "#{l}" }.join("\n") + "\n```\n\n" end @@ -43,7 +43,7 @@ module Kramdown if el.children.first && el.children.first.type == :p && !el.children.first.options[:transparent] if el.children.size == 1 && @stack.last.children.last == el && - (@stack.last.children.any? {|c| c.children.first.type != :p } || @stack.last.children.size == 1) + (@stack.last.children.any? { |c| c.children.first.type != :p } || @stack.last.children.size == 1) # replace the end of block character res.sub!(/\^\n\z/m, "#{END_OF_BLOCK}\n") end @@ -82,7 +82,7 @@ module Kramdown def convert_tr(el, opts) return super unless @options[:html_tables] - "<tr>\n#{el.children.map {|c| convert(c, opts) }.join}</tr>\n" + "<tr>\n#{el.children.map { |c| convert(c, opts) }.join}</tr>\n" end def convert_td(el, opts) |