Sha256: d2c836ce46203ca0462f30b9655b9ebeb5dfa4f5f1bff95f5636d671ea07f39b

Contents?: true

Size: 803 Bytes

Versions: 26

Compression:

Stored size: 803 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

26 entries across 15 versions & 2 rubygems

Version Path
kitabu-1.0.6 examples/RailsGuides/config/helper.rb
kitabu-1.0.6 templates/helper.rb
kitabu-1.0.5 templates/helper.rb
kitabu-1.0.5 examples/RailsGuides/config/helper.rb
bookshelf-1.2.1 templates/helper.rb
bookshelf-1.2.0 templates/helper.rb
bookshelf-1.1.0 templates/helper.rb
bookshelf-1.0.0 templates/helper.rb
kitabu-1.0.4 examples/RailsGuides/config/helper.rb
kitabu-1.0.4 templates/helper.rb
kitabu-1.0.3 examples/RailsGuides/config/helper.rb
kitabu-1.0.3 templates/helper.rb
kitabu-1.0.2 templates/helper.rb
kitabu-1.0.2 examples/RailsGuides/config/helper.rb
kitabu-1.0.1 templates/helper.rb
kitabu-1.0.1 examples/RailsGuides/config/helper.rb
kitabu-1.0.0 examples/RailsGuides/config/helper.rb
kitabu-1.0.0 templates/helper.rb
kitabu-1.0.0.rc4 examples/RailsGuides/config/helper.rb
kitabu-1.0.0.rc4 templates/helper.rb