blaze-html-truncate-0.3.0.0: 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

-> Markup

The HTML to truncate

-> Maybe Markup

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.