utils.strip_newlines
Parameters
- $string
The string to strip newlines from.
- $leading
Whether to strip leading newlines.
- $trailing
Whether to strip trailing newlines.
This template strips at most one leading and one trailing newline from $string. This is useful for preformatted block elements where leading and trailing newlines are ignored to make source formatting easier for authors.