p5-HTML-Truncate
0.20_1Truncate HTML by character count while preserving well-formedness
When working with text it is convenient and common to want to truncate strings to make them fit a desired context. E.g., you might have a menu that is only 100px wide and prefer text doesn't wrap so you'd truncate it around 15-30 characters, depending on preference and typeface size. This is trivial with plain text and substr but with HTML it is somewhat difficult because whitespace has fluid significance and open tags that are not properly closed destroy well-formedness and can wreck an entire layout. HTML::Truncate attempts to account for those two problems by padding truncation for spacing and entities and closing any tags that remain open at the point of truncation.
Origin: textproc/p5-HTML-Truncate
Category: textproc
Size: 25.3KiB
License: not specified
Maintainer: perl@FreeBSD.org
Dependencies: 3 packages
Required by: 0 packages
Website: metacpan.org/release/HTML-Truncate
$
pkg install p5-HTML-TruncateDependencies (3)
More in textproc
libxml22.15.2
XML parser library for GNOMEexpat2.7.4
XML 1.0 parser written in Cqt5-xml5.15.18p109
Qt SAX and DOM implementations (KDE patched)kf6-kcodecs6.22.0
String encoding librarylibxslt1.1.45
XML stylesheet transformation libraryrubygem-nokogiri1.19.1
HTML, XML, SAX, and Reader parseraspell0.60.8.1_1,1
Spelling checker with better suggestion logic than ispellphp84-xml8.4.16
The xml shared extension for phpkf6-sonnet6.22.0
Multi-language spell checkerp5-XML-LibXML2.0210_1,1
Interface to Gnome libxml2 library