webdestroya/sourcemod-translator

View on GitHub
app/helpers/phrases_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
module PhrasesHelper

  def phrase_text(text)
    #text.html_safe
    text = text.gsub(/(\{[0-9]+\})/, "<strong>\\1</strong>")
    text = text.gsub(/(\%[dixfsct])/, "<strong>\\1</strong>")
    content_tag(:span, text.html_safe, class: "phrase-text")
  end

end