diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /lib/kramdown/converter/commonmark.rb | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'lib/kramdown/converter/commonmark.rb')
-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) |