-
Notifications
You must be signed in to change notification settings - Fork 4
Remove leftover indentation text nodes in DOM when elements are removed #130
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
Conversation
71a1958
to
adf54ca
Compare
af84769
to
b21fb24
Compare
@qmonmert |
9d9308e
to
54eb5fc
Compare
can you publish a beta version to test in our project? |
@qmonmert : I'll build a snapshot version locally and test it. |
@gastaldi : it's a bit better, but there's still an extra line: <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement> |
@gastaldi : the issue mentioned above #130 (comment) is still present :/ |
d6b2871
to
bfcb8e2
Compare
Co-authored-by: Quentin <[email protected]>
When removing an element, extra text nodes may be still left over, this ensures these extra text nodes are removed
This reverts commit bfcb8e2.
985be17
to
6b02aa8
Compare
@gastaldi : Here's the test modified to reproduce the issue: @Test
void should_not_add_extra_line_break() throws Exception {
Path pom = Paths.get(getClass().getResource("extra-line-pom.xml").toURI());
Model model = Maven.readModel(pom);
model.getDependencyManagement().getDependencies().remove(0);
Dependency dep = new Dependency();
dep.setGroupId("org.springframework.boot");
dep.setArtifactId("spring-boot-dependencies");
dep.setVersion("${spring-boot.version}");
dep.setScope("import");
dep.setType("pom");
Dependency dep2 = new Dependency();
dep2.setGroupId("org.springframework.boot");
dep2.setArtifactId("spring-boot-dependencies");
dep2.setVersion("${spring-boot.version}");
dep2.setScope("import");
model.getDependencyManagement().addDependency(dep2);
StringWriter sw = new StringWriter();
Maven.writeModel(model, sw);
Approvals.verify(sw.toString());
} |
@murdos thank you for the test case, I've pushed a potential fix again, can you give it a try? |
@gastaldi : I just tried, and it's now fixed! Thanks :-) |
@gastaldi thanks to you 🙂 |
Uh oh!
There was an error while loading. Please reload this page.