lol-html
lol-html copied to clipboard
Added on_after_end_tag handler
This adds an on_after_end_tag
handler to address #108. Note that when I made the commit, the pre-commit hook fired and reformatted the entire codebase as part 1.56.0 standard.
I'm not sure why the code base is currently not formatted to latest cargo fmt
. As such this includes a lot of changes that are completely irrelevant to the actual change I was trying to make.
If this type of change is interesting I can address the code formatting situation and ad tests and docs.
So the challenge I'm now recognizing is that because a lot of HTML tags are optional there is no guarantee that you're going to have an end of tag callback. Take for instance a list of items (<li>
). The closing li
tag is optional.
Thanks for the PR! https://github.com/cloudflare/lol-html/pull/112 fixes the formatting, can you rebase over master so the PR only has your own changes?
This adds an on_after_end_tag handler to address #108. So the challenge I'm now recognizing is that because a lot of HTML tags are optional there is no guarantee that you're going to have an end of tag callback. Take for instance a list of items (
<li>
). The closing li tag is optional.
Hmm, I think it makes sense to hold off on merging this until we figure out https://github.com/cloudflare/lol-html/issues/110.
I rebased it. I agree that merging this without addressing #110 is not immensely useful.