Skip to content

Commit

Permalink
Avoid trailing space in processing instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Vanelverdinghe <[email protected]>
  • Loading branch information
anthonyvdotbe authored and angelozerr committed Nov 16, 2020
1 parent 51b6d6b commit 3bf5229
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ public XMLBuilder startPrologOrPI(String tagName) {
public XMLBuilder addContentPI(String content) {
appendSpace();
append(content);
appendSpace();
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public void testProlog4WithUnknownVariable() throws BadLocationException {
public void testPI() throws BadLocationException {
String content = "<a><?m2e asd as das das ?></a>";
String expected = "<a>" + lineSeparator() + //
" <?m2e asd as das das ?>" + lineSeparator() + //
" <?m2e asd as das das?>" + lineSeparator() + //
"</a>";
assertFormat(content, expected);
}
Expand Down Expand Up @@ -404,7 +404,7 @@ public void testDefinedPIWithJustAttributeNames() throws BadLocationException {
public void testPIWithVariables() throws BadLocationException {
String content = "<a><?xml-styleZZ href=\"my-style.css\" type= \"text/css\"?></a>";
String expected = "<a>" + lineSeparator() + //
" <?xml-styleZZ href=\"my-style.css\" type= \"text/css\" ?>" + lineSeparator() + //
" <?xml-styleZZ href=\"my-style.css\" type= \"text/css\"?>" + lineSeparator() + //
"</a>";
assertFormat(content, expected);
}
Expand Down

0 comments on commit 3bf5229

Please sign in to comment.