-
Notifications
You must be signed in to change notification settings - Fork 9
removeEmpty
M. Mikkel Rummelhoff edited this page Mar 8, 2020
·
2 revisions
removeEmpty attempts to remove nodes without any content.
Remove all empty nodes
{{ entry.body | retconRemoveEmpty }}
Remove empty paragraphs
{{ entry.body | retconRemoveEmpty('p') }}
Remove empty paragraphs, including <br/>
tags
{{ entry.body | retconRemoveEmpty('p', true) }}
@selectors Mixed
String value or Array of string values
Examples: "p"
".foo"
"#bar"
"div.baz"
@removeBr Boolean (default false
)
Remove or retain <br/>
tags