withStrikethrough

DSL helper for applying strikethrough formatting to a block of text.

This is the recommended way to add strikethrough formatting as it automatically manages the annotation stack.

Example:

buildOudsAnnotatedBodyText {
append("Original price: ")
withStrikethrough {
append("$100")
}
append(" Now: $80")
}

Return

The result of the block.

Parameters

block

The lambda that appends the text to be formatted with strikethrough.