Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(parser): Highlight special close-implies-open logic #1047

Merged
merged 1 commit into from Dec 17, 2021

Commits on Dec 14, 2021

  1. Highlight special close-implies-open logic for p and br

    Only </p> and </br> close tags result in implied open tags:
    - [`p`](https://github.com/fb55/htmlparser2/blob/6445c32b05dc070049eeaaf201bfc123daca3d37/src/Parser.ts#L336)
    - [`br`](https://github.com/fb55/htmlparser2/blob/6445c32b05dc070049eeaaf201bfc123daca3d37/src/Parser.ts#L340) tags.
    
    This commit clarifies this in the existing comments. It also
    makes the special case nature of this more apparent by using
    the literal values 'p' and 'br' instead of the variable `name`,
    which is proven to have these values. This is less obfuscating.
    vassudanagunta committed Dec 14, 2021
    Copy the full SHA
    9b096c2 View commit details
    Browse the repository at this point in the history