Module: SupportDirectTextileClassesAndIds::TextileHelper

Defined in:
lib/support_direct_textile_classes_and_ids/textile_helper.rb

Overview

Remove the ‘wiki-class-` and `wiki-id-` prefixes

Instance Method Summary collapse

Instance Method Details

#textilizable(*args) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/support_direct_textile_classes_and_ids/textile_helper.rb', line 4

def textilizable(*args)
  if html = super
    html
      .gsub(/\wiki-class-(\w+)/, '\1')
      .gsub(/\wiki-id-(\w+)/, '\1')
      .html_safe
  end
end