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:
Diffstat (limited to 'lib/banzai/filter/abstract_reference_filter.rb')
-rw-r--r--lib/banzai/filter/abstract_reference_filter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/banzai/filter/abstract_reference_filter.rb b/lib/banzai/filter/abstract_reference_filter.rb
index b0a2f6f69d5..2448c2c2bb2 100644
--- a/lib/banzai/filter/abstract_reference_filter.rb
+++ b/lib/banzai/filter/abstract_reference_filter.rb
@@ -265,7 +265,7 @@ module Banzai
extras = []
if matches.names.include?("anchor") && matches[:anchor] && matches[:anchor] =~ /\A\#note_(\d+)\z/
- extras << "comment #{$1}"
+ extras << "comment #{Regexp.last_match(1)}"
end
extension = matches[:extension] if matches.names.include?("extension")
@@ -436,7 +436,7 @@ module Banzai
escaped = escape_html_entities(text)
escaped.gsub(REFERENCE_PLACEHOLDER_PATTERN) do |match|
- placeholder_data[$1.to_i]
+ placeholder_data[Regexp.last_match(1).to_i]
end
end
end