Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public final class CSSParseHelper

/**
* Order of the rules in brackets is important!<br>
* The part "([eE][+-]?[0-9]+)?" was added for #79
* The parts "([eE][+-]?[0-9]+)?" were added for #79, #82
*/
@RegEx
private static final String SPLIT_NUMBER_REGEX = "^([0-9]*\\.[0-9]+|[0-9]+([eE][+-]?[0-9]+)?).*$";
private static final String SPLIT_NUMBER_REGEX = "^([0-9]*\\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+([eE][+-]?[0-9]+)?).*$";
private static final Pattern SPLIT_NUMBER_PATTERN = RegExCache.getPattern (SPLIT_NUMBER_REGEX);

@PresentForCodeCoverage
Expand Down
3 changes: 2 additions & 1 deletion ph-css/src/main/jjtree/ParserCSS30.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ TOKEN :
| < #NAME: ( <NMCHAR> )+ >
| < #NUM: ( ["0"-"9"] )+
| ( ["0"-"9"] )* "." ( ["0"-"9"] )+
| ( ["0"-"9"] )+ ["e", "E"] ( ["+", "-"] )? ( ["0"-"9"] )+ >
| ( ["0"-"9"] )+ ["e", "E"] ( ["+", "-"] )? ( ["0"-"9"] )+
| ( ["0"-"9"] )+ "." ( ["0"-"9"] )+ ["e", "E"] ( ["+", "-"] )? ( ["0"-"9"] )+ >
| < #URLCHAR: ["!","#","$","%","&","*"-"[","]"-"~"]
| <NONASCII>
| <ESCAPE> >
Expand Down
10 changes: 10 additions & 0 deletions ph-css/src/test/resources/testfiles/css30/good/issue79.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ div {
padding: 999e-06;
padding: 999e+6;
padding: 999e+06;
padding: 1.5e6;
padding: 1.5e-6;
padding: 1.5e-06;
padding: 1.5e+6;
padding: 1.5e+06;
}

span {
Expand All @@ -22,4 +27,9 @@ span {
padding: 999e-06em;
padding: 999e+6em;
padding: 999e+06em;
padding: 1.5e6em;
padding: 1.5e-6em;
padding: 1.5e-06em;
padding: 1.5e+6em;
padding: 1.5e+06em;
}