Skip to content

Commit 9e6f9b9

Browse files
VolkerVolker
authored andcommitted
Restore old newline behavior and fix tests under Windows
1 parent f671a5b commit 9e6f9b9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/com/inet/lib/less/CssFormatter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ CssFormatter space() {
797797
* @return a reference to this object
798798
*/
799799
CssFormatter newline() {
800-
output.append( System.lineSeparator() );
800+
output.append( '\n' );
801801
return this;
802802
}
803803

@@ -821,7 +821,7 @@ void insets() {
821821
* @return a reference to this object
822822
*/
823823
CssFormatter comment( String msg ) {
824-
getOutput().append( insets ).append( msg ).append( System.lineSeparator() );
824+
getOutput().append( insets ).append( msg ).append( '\n' );
825825
return this;
826826
}
827827

src/com/inet/lib/less/LessException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public String getOriginalMessage() {
105105
public String getMessage() {
106106
StringBuilder builder = new StringBuilder( super.getMessage() );
107107
for( LessFilePosition pos : positions ) {
108-
builder.append( System.lineSeparator() ).append( " on line " ).append( pos.getLine() ).append( ", column " ).append( pos.getColumn() );
108+
builder.append( "\n\t on line " ).append( pos.getLine() ).append( ", column " ).append( pos.getColumn() );
109109
if( pos.getFilename() != null ) {
110110
builder.append( ", file " ).append( pos.getFilename() );
111111
}

test/com/inet/lib/less/ErrorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ private void assertLessException( String less, String expectedErrorMessage ) {
1313
fail( "LessException expected" );
1414
} catch( LessException lex ) {
1515
String message = lex.getMessage();
16-
assertEquals( expectedErrorMessage, message.substring( 0, message.indexOf( System.lineSeparator() ) ) );
16+
assertEquals( expectedErrorMessage, message.substring( 0, message.indexOf( '\n' ) ) );
1717
}
1818
}
1919
@Test

0 commit comments

Comments
 (0)