-
-
Notifications
You must be signed in to change notification settings - Fork 190
[bugfix] omit newline after doctype with indent=no #5370
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ public void setUp() throws Exception { | |
|
||
@Test | ||
public void testAttributeWithBooleanValue() throws Exception { | ||
final String expected = "<!DOCTYPE html>\n<input checked>"; | ||
final String expected = "<!DOCTYPE html><input checked>"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would it be useful to have an other test with the \n still there, to show the (non?) effect of the changes? |
||
final QName elQName = new QName("input"); | ||
writer.startElement(elQName); | ||
writer.attribute("checked", "checked"); | ||
|
@@ -54,7 +54,7 @@ public void testAttributeWithBooleanValue() throws Exception { | |
|
||
@Test | ||
public void testAttributeWithNonBooleanValue() throws Exception { | ||
final String expected = "<!DOCTYPE html>\n<input name=\"name\">"; | ||
final String expected = "<!DOCTYPE html><input name=\"name\">"; | ||
final QName elQName = new QName("input"); | ||
writer.startElement(elQName); | ||
writer.attribute("name", "name"); | ||
|
@@ -66,7 +66,7 @@ public void testAttributeWithNonBooleanValue() throws Exception { | |
|
||
@Test | ||
public void testAttributeQNameWithBooleanValue() throws Exception { | ||
final String expected = "<!DOCTYPE html>\n<input checked>"; | ||
final String expected = "<!DOCTYPE html><input checked>"; | ||
final QName elQName = new QName("input"); | ||
final QName attrQName = new QName("checked"); | ||
writer.startElement(elQName); | ||
|
@@ -79,7 +79,7 @@ public void testAttributeQNameWithBooleanValue() throws Exception { | |
|
||
@Test | ||
public void testAttributeQNameWithNonBooleanValue() throws Exception { | ||
final String expected = "<!DOCTYPE html>\n<input name=\"name\">"; | ||
final String expected = "<!DOCTYPE html><input name=\"name\">"; | ||
final QName elQName = new QName("input"); | ||
final QName attrQName = new QName("name"); | ||
writer.startElement(elQName); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,15 +39,14 @@ | |
import java.io.IOException; | ||
import java.nio.file.Files; | ||
|
||
import static java.nio.charset.StandardCharsets.UTF_8; | ||
import static org.junit.Assert.*; | ||
import static org.junit.Assert.assertEquals; | ||
|
||
public class SerializationTest { | ||
|
||
private static final String XML_WITH_DOCTYPE = | ||
"<!DOCTYPE bookmap PUBLIC \"-//OASIS//DTD DITA BookMap//EN\" \"bookmap.dtd\">\n" + | ||
"<bookmap id=\"bookmap-1\"/>"; | ||
"<!DOCTYPE bookmap PUBLIC \"-//OASIS//DTD DITA BookMap//EN\" \"bookmap.dtd\">" + | ||
"<bookmap id=\"bookmap-1\"><title>The Title</title></bookmap>"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why add a child element here, it doesn't seem that it has changed anything else about the test? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The child element was added to see the effect of |
||
|
||
private static final String XML_WITH_XMLDECL = | ||
"<?xml version=\"1.1\" encoding=\"ISO-8859-1\" standalone=\"yes\"?>\n" + | ||
|
Uh oh!
There was an error while loading. Please reload this page.