blaze-html-truncate-0.1.0.3: A truncator for blaze-html

Safe HaskellNone

Text.Blaze.Truncate

Synopsis

Documentation

truncateHtmlSource

Arguments

:: Int

The amount of characters (not counting tags) which the truncated text should have at most

-> Html

The HTML to truncate

-> Maybe Html

Just the truncated HTML or Nothing if no truncation occured

Truncate the given HTML to a certain length, preserving tags. Returns the truncated Html or Nothing if no truncation occured. Words are preserved, so if the truncated text ends within some word, that whole word is cut.