Skip to content

Commit

Permalink
remove hack for wrong encoded  
Browse files Browse the repository at this point in the history
  • Loading branch information
volker committed Jul 19, 2023
1 parent a58c326 commit 272d233
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 55 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/inet/sass/parser/ScssParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ private SassListItem parseNumber( char ch ) {

// parse the unit value
LOOP: for( ;; ) {
if( Character.isLetter( ch ) || ch == '%' || ch == '\ufffd' ) { //TODO the '\ufffd' is a hack for the valo test because it is read as ASCII
if( Character.isLetter( ch ) || ch == '%' ) {
builder.append( ch );
} else {
reader.back( ch );
Expand Down
8 changes: 0 additions & 8 deletions src/test/java/com/inet/sass/testcases/scss/VaadinThemes.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,15 @@
*/
package com.inet.sass.testcases.scss;

import java.nio.charset.StandardCharsets;

import org.junit.Assert;
import org.junit.Test;

import com.inet.sass.AbstractTestBase;
import com.inet.sass.resolver.FilesystemResolver;
import com.inet.sass.resolver.ScssStylesheetResolver;

public class VaadinThemes extends AbstractTestBase {
String scssFolder = "/vaadin-themes/scss";
String cssFolder = "/vaadin-themes/css";

protected ScssStylesheetResolver getResolver( String filename ) {
return new FilesystemResolver( StandardCharsets.US_ASCII ); // the source is UTF8 but the references are saved for the old ASCII encoding
}

@Test
public void compileValo() throws Exception {
String scss = scssFolder + "/valo/styles.scss";
Expand Down
Loading

0 comments on commit 272d233

Please sign in to comment.