Closed phil-scott-78 closed 2 years ago
Disregard! I was going through release notes while upgrading Statiq and it looks like you answered my question back in March with the WithNestedElements
option.
I'll close this down.
Oh good, problems past me fixed are the best kind! I'm guessing it's not quite as smart as the code you posted above though in terms of looking for IText
nodes, so let me know if it looks like we need to improve the feature after using it.
It's working well for me right now, and I put a lot of silly stuff in headings so I suspect anyone doing anything different doesn't have valid HTML.
That being said I'm not sure how I'm configuring this is the best or most stable. Is there a more clever way to swap out a nested middle?
Ultimately it would be pretty slick if modules had a stable and unique identifier in the default pipeline that I could get right at.
Given a heading like
the gathered up content ends up being
"My is so powerful
.Looking at the code there is a special case for handling anchors. I just copied and pasted this module and created my own version that simply reads
I'm sure I'm missing some cases, but this seems to be a bit more foolproof, especially if someone has things like bold, italics or just a span in there.