Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 14:18:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 14:18:08 +0300
commit5afcbe03ead9ada87621888a31a62652b10a7e4f (patch)
tree9918b67a0d0f0bafa6542e839a8be37adf73102d /lib/banzai/filter/table_of_contents_filter.rb
parentc97c0201564848c1f53226fe19d71fdcc472f7d0 (diff)
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'lib/banzai/filter/table_of_contents_filter.rb')
-rw-r--r--lib/banzai/filter/table_of_contents_filter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/banzai/filter/table_of_contents_filter.rb b/lib/banzai/filter/table_of_contents_filter.rb
index de3e978b320..abd1003fde0 100644
--- a/lib/banzai/filter/table_of_contents_filter.rb
+++ b/lib/banzai/filter/table_of_contents_filter.rb
@@ -55,7 +55,7 @@ module Banzai
def anchor_tag(href)
escaped_href = CGI.escape(href) # account for non-ASCII characters
- %{<a id="user-content-#{href}" class="anchor" href="##{escaped_href}" aria-hidden="true"></a>}
+ %(<a id="user-content-#{href}" class="anchor" href="##{escaped_href}" aria-hidden="true"></a>)
end
def push_toc(children, root: false)
@@ -69,7 +69,7 @@ module Banzai
end
def push_anchor(header_node)
- result[:toc] << %{<li><a href="##{header_node.href}">#{header_node.text}</a>}
+ result[:toc] << %(<li><a href="##{header_node.href}">#{header_node.text}</a>)
push_toc(header_node.children)
result[:toc] << '</li>'
end