lol-html icon indicating copy to clipboard operation
lol-html copied to clipboard

Added on_after_end_tag handler

Open mitsuhiko opened this issue 2 years ago • 3 comments

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.

mitsuhiko avatar Nov 29 '21 11:11 mitsuhiko

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.

mitsuhiko avatar Nov 29 '21 15:11 mitsuhiko

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.

jyn514 avatar Dec 16 '21 16:12 jyn514

I rebased it. I agree that merging this without addressing #110 is not immensely useful.

mitsuhiko avatar Dec 27 '21 18:12 mitsuhiko