Remove 'empty' element but keep the content #559
Unanswered
thewilkybarkid
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
#509 describes how to remove empty (i.e. whitespace-only) elements, but, unlike the default
disallowedTagsMode
option ofdiscard
, this removes the element entirely (including its content).For example:
will end up as
rather than
Is there a way to use the technique of
exclusiveFilter
but preserve its text?Beta Was this translation helpful? Give feedback.
All reactions