diff --git a/_plugins/moneropedia.rb b/_plugins/moneropedia.rb
index 0370037e..47ddcc7f 100644
--- a/_plugins/moneropedia.rb
+++ b/_plugins/moneropedia.rb
@@ -120,14 +120,14 @@ module Jekyll
if lang != "en"
@@moneropedia[lang].each do |entry|
entry[:terms].each do |term|
- content = content.gsub(/(\@#{term})((?=-#{lookahead})|(?![\w-]))/i, '' + term.gsub('-',' ') + '')
+ content = content.gsub(/(\@#{term})((?=-#{lookahead})|(?![\w-]))/i) { |match_term| '' + match_term.gsub(/[@-]/, '@' => '', '-' => ' ') + '' }
end
end
end
# For English and as a default (in case an entry has been forgotten in a non-English moneropedia folder)
@@moneropedia["en"].each do |entry|
entry[:terms].each do |term|
- content = content.gsub(/(\@#{term})((?=-#{lookahead})|(?![\w-]))/i, '' + term.gsub('-',' ') + '')
+ content = content.gsub(/(\@#{term})((?=-#{lookahead})|(?![\w-]))/i) { |match_term| '' + match_term.gsub(/[@-]/, '@' => '', '-' => ' ') + '' }
end
end
end
@@ -136,4 +136,4 @@ module Jekyll
end
end
end
-end
\ No newline at end of file
+end