Sha256: 8b18daf1c434b7751eb91d2375f7733ee84f30890e8feed57b03129612fcdba7

Contents?: true

Size: 510 Bytes

Versions: 16

Compression:

Stored size: 510 Bytes

Contents

module EvilFront::Helpers
  # Insert non-break spaces and mark quotes to have nice text.
  # Work only with Russian language.
  #
  #   = russian_typograph user.description
  #
  # You can send block:
  #
  #   = russian_typograph do
  #     = user.name
  #     = user.profession
  def russian_typograph(text = nil, &block)
    text = if block_given?
      capture(&block)
    else
      EvilFront.escape(text)
    end
    text = EvilFront::Russian.typograph_html(text)
    EvilFront.html_safe(text)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
evil-front-0.5.1 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.5.0 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.4.0 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.10 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.9 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.8 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.7 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.6 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.5 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.4 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.3 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.2 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.1 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.3.0 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.2.1 lib/evil-front/helpers/russian_typograph.rb
evil-front-0.2.0 lib/evil-front/helpers/russian_typograph.rb