Skip to content
New issue

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

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

Already on GitHub? # to your account

[Java] Stop emitting close tags if self-closing #362

Merged
merged 8 commits into from
Nov 13, 2023

Conversation

kojiishi
Copy link
Collaborator

@kojiishi kojiishi commented Nov 11, 2023

This patch changes Java HTMLProcessor not to emit close tags if the tag is self-closing.

Also adds tests for:

  • Unpaired close tags.
  • Self-closing tags don't affect skip nodes (e.g., <nobr>.)

These test cases are from #355.

Fixes #361.

This patch changes Java `HTMLProcessor` not to emit close tags if the tag is self-closing.

Also adds tests for:
* Unpaired close tags.
* Self-closing tags don't affect skip nodes (e.g., `<nobr>`.)
These test cases are from google#355.

Fixes google#361.
@kojiishi kojiishi marked this pull request as ready for review November 11, 2023 07:48
@kojiishi kojiishi requested a review from tushuhei November 11, 2023 07:49
@kojiishi
Copy link
Collaborator Author

Needed to print diff on Java Style Check because local run didn't match. I'm fine to revert that part, but thought it may be useful, up to you.

Copy link
Member

@tushuhei tushuhei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! The fix on the Java style check is helpful. Just a small comment regarding the version tagging.

@kojiishi kojiishi changed the title Java: Stop emitting close tags if self-closing [Java] Stop emitting close tags if self-closing Nov 11, 2023
tushuhei
tushuhei previously approved these changes Nov 13, 2023
@kojiishi kojiishi merged commit 14da897 into google:main Nov 13, 2023
@kojiishi kojiishi deleted the unpaired-j branch November 13, 2023 16:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Java] Java version emits close tag for self-closing tags
2 participants