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

Issue 242: Enable XML mode of parsing documents #249

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

KajP
Copy link
Contributor

@KajP KajP commented Oct 31, 2024

This PR is created to fix the issue #242.

The default parsing of htmlparser2 appears to have a unique handling mechanism for self-closing or void tags. It only parses void tags from a predefined list of known HTML self-closing tags. <url /> is not on the list which makes the parser discard subsequent tags in pom.xml such as <dependencies> and <build>. Here's xmlMode referenced in htmlparser2.

Enabling XML mode fixes the issue, and so the extension is able to edit the existing <dependencies> body.

I only tested the code manually and haven't added any automated tests.

@KajP
Copy link
Contributor Author

KajP commented Oct 31, 2024

@microsoft-github-policy-service agree

Copy link
Collaborator

@testforstephen testforstephen left a comment

Choose a reason for hiding this comment

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

LGTM. thanks for contrib

@testforstephen
Copy link
Collaborator

/azp run

Copy link

No pipelines are associated with this pull request.

@testforstephen testforstephen linked an issue Nov 27, 2024 that may be closed by this pull request
@testforstephen testforstephen merged commit 2b884fd into microsoft:main Nov 27, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using Add Starters will repeatedly add dependencies
2 participants