Instead of ignoreTag it could be named ignoreTags and allow to contain CSS selectors like other posthtml plugins as posthtml-match-helper accepts [tag]#[id].[class]. E.g div#id. It would not require the developers to insert extra wrapper tags and modify the html at all. E.g. with
const options = { ignoredTags: ['div#id','.ignore'] }
would not alter
<div id='id' data-attrib='{{attribute}}'>and {{content}} not meant to be altered</div>
or
<div class='.ignore' data-attrib='{{attribute}}'>and {{content}} not meant to be altered</div>
at all.
Further more similarly other ...Tags options could use the same logic similarly to Angular Structural directive like
<div *ngIf="[condition]"></div>
Instead of
ignoreTagit could be namedignoreTagsand allow to contain CSS selectors like other posthtml plugins as posthtml-match-helper accepts [tag]#[id].[class]. E.gdiv#id. It would not require the developers to insert extra wrapper tags and modify the html at all. E.g. withwould not alter
or
at all.
Further more similarly other
...Tagsoptions could use the same logic similarly to Angular Structural directive like