Safe Haskell | None |
---|
- truncateHtml :: Int -> Html -> Maybe Html
Documentation
:: Int | The amount of characters (not counting tags) which the truncated text should have at most |
-> Html | The HTML to truncate |
-> Maybe Html |
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.