Sha256: 12ff21b8d3c30468cb7954e06470701a8cc320b9b9b4698c9eed05e3c0c5c21b

Contents?: true

Size: 804 Bytes

Versions: 11

Compression:

Stored size: 804 Bytes

Contents

# Put any Ruby code in here.
# Here's an example on how you can extend RedCloth (Textile) with new formatters.
#
#   module RedCloth
#     module Formatters
#       module HTML
#         def attention(options)
#           %[<p class="attention">#{options[:text]}</p>]
#         end
#       end
#     end
#   end
#
# Then you can just use `attention. This is an important note!` on your text.
#
# You can add inline formatters as well. The approach is slightly different,
# but pretty straightforward.
#
# Add your formatter to `RedCloth::INLINE_FORMATTERS` and implement the method, making sure that it
# replaces the content using `String#gsub!`.
#
#   module RedCloth
#     def my_formatter(text)
#       text.gsub!(/Hello/, "Hi")
#     end
#   end
#
#   RedCloth::INLINE_FORMATTERS << :my_formatter
#

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kitabu-1.0.6 spec/support/mybook/config/helper.rb
kitabu-1.0.5 spec/support/mybook/config/helper.rb
kitabu-1.0.4 spec/support/mybook/config/helper.rb
kitabu-1.0.3 spec/support/mybook/config/helper.rb
kitabu-1.0.2 spec/support/mybook/config/helper.rb
kitabu-1.0.1 spec/support/mybook/config/helper.rb
kitabu-1.0.0 spec/support/mybook/config/helper.rb
kitabu-1.0.0.rc4 spec/support/mybook/config/helper.rb
kitabu-1.0.0.rc3 spec/support/mybook/config/helper.rb
kitabu-1.0.0.rc2 spec/support/mybook/config/helper.rb
kitabu-1.0.0.rc1 spec/support/mybook/config/helper.rb