Socket
Book a DemoInstallSign in
Socket

textilize

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textilize

0.0.4
bundlerRubygems
Version published
Maintainers
2
Created
Source

Textilize

As of version 3, Rails doesn't have the textilize and textilize_without_paragraph helper methods. Textilize is a gem brings back the missing method for Rails 3, and it includes the library RedCloth 3.0.4 (newest is at 4.X), which doesn't need to be compiled on server.

The reason we need this gem is that we use :textilize at a few places in our apps, and we don't need super fast RedCloth, we just need a working version that don't force us to install C extensions on various production servers. This could be useful for bundle-package usage, where you can rely on the bundle/cache gems.

BTW, Textilize is not always the top choice, there are some useful gems that are doing it great, but they will requires C extension due to higher version of RedCloth dependency:

https://github.com/dtrasbo/formatize/

https://github.com/rohit/prarupa

Installation

Put gem 'textilize' into your Gemfile and do a bundle install, and that's it.

Usage

The textilize & textilize_without_paragraph helper methods

textilize("I _love_ ROR(Ruby on Rails)!")
# => "<p>I <em>love</em> <acronym title="Ruby on Rails">ROR</acronym>!</p>"

textilize_without_paragraph("I _love_ ROR(Ruby on Rails)!")
# => "I <em>love</em> <acronym title="Ruby on Rails">ROR</acronym>!"

Test

rake test

Credits

whytheluckystiff: RedCloth library

David Heinemeier Hansson: the text helper.

Copyright (c) 2012 Kudelabs

Released under the MIT License. See LICENSE for details.

FAQs

Package last updated on 06 Jul 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.