Topic: Expose list of tags that need a close tag

If you want to use `hook_tag` method, you currently have to make a copy of the HTML tags that require a close tag. You can see that being recommended in the docs in https://bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm#s3.4.9.

I think it would be an improvement if that would not be necessary.

One idea would be to simply expose this as a constant. That way we can simply plug in that constant instead.

One way to do that would be:

interface HtmLawedConstants {
    public const EMPTY_ELEMENTS = ['img', ..];

This would work for both the OPP and function version.


Re: Expose list of tags that need a close tag

Thank you for suggesting this. It certainly seems something useful, but I am afraid that implementing this may lead to expectations like defining another set of elements/attributes/rules for some other purpose. I am therefore against the idea. The hook_tag function is for custom functionality and anyone writing such custom code surely has a good understanding of HTML and perhaps doesn't need this sort of shortcut.


Re: Expose list of tags that need a close tag

I see your point.  Thanks for considering nonetheless.