Registry / utility / truncate-html

truncate-html

JSON →
library0.9.3rbrubygemsunverified

Truncates html so you don't have to.

gem install truncate_html
INSTALL
IMPORT
SIG · TRUNCATE-HTML
T
truncate-html
utilityrubyv0.9.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TruncateHtml
require 'truncate_html'

Truncate HTML strings while preserving valid markup.

require 'truncate_html' html = "<p>Hello <b>world</b> this is a long paragraph.</p>" truncated = TruncateHtml::HtmlTruncator.new(html).truncate(length: 20) # => "<p>Hello <b>world</b> thi...</p>"
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.9.3latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
truncate-html — gem install truncate-html · libregistry