File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
java/org/htmlunit/cssparser/parser Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ TOKEN_MGR_DECLS :
103103// {s} {return S;}
104104 < S: ( " "|"\t"|"\r"|"\n"|"\f" )+ >
105105// w {s}?
106- | < W: ( <S> )? >
106+ // | < W: ( <S> )? >
107107}
108108
109109<DEFAULT> MORE :
@@ -315,7 +315,7 @@ TOKEN_MGR_DECLS :
315315| < CHARSET_SYM: "@" <C_LETTER> <H_LETTER> <A_LETTER> <R_LETTER> <S_LETTER> <E_LETTER> <T_LETTER> >
316316
317317// "!"({w}|{comment})*{I}{M}{P}{O}{R}{T}{A}{N}{T} {return IMPORTANT_SYM;}
318- | < IMPORTANT_SYM: "!" ( <W > | <COMMENT_> )* <I_LETTER> <M_LETTER> <P_LETTER> <O_LETTER> <R_LETTER> <T_LETTER> <A_LETTER> <N_LETTER> <T_LETTER> >
318+ | < IMPORTANT_SYM: "!" ( <S > | <COMMENT_> )* <I_LETTER> <M_LETTER> <P_LETTER> <O_LETTER> <R_LETTER> <T_LETTER> <A_LETTER> <N_LETTER> <T_LETTER> >
319319
320320// {num}{E}{M} {return EMS;}
321321| < EMS: <NUM> <E_LETTER> <M_LETTER> > { matchedToken.image = ParserUtils.trimBy(image, 0, 2); }
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ private void css() throws Exception {
7171 assertEquals (0 , errorHandler .getWarningCount ());
7272
7373 final CSSRuleListImpl rules = ss .getCssRules ();
74- assertEquals (5 , rules .getLength ());
74+ assertEquals (7 , rules .getLength ());
7575
7676 AbstractCSSRuleImpl rule = rules .getRules ().get (0 );
7777 assertEquals ("*.sel1 { padding: 0 !important; }" , rule .getCssText ());
@@ -86,6 +86,12 @@ private void css() throws Exception {
8686 assertEquals ("*.sel4 { font-weight: normal !important; }" , rule .getCssText ());
8787
8888 rule = rules .getRules ().get (4 );
89+ assertEquals ("*.sel5 { font-weight: normal !important; }" , rule .getCssText ());
90+
91+ rule = rules .getRules ().get (5 );
92+ assertEquals ("*.sel6 { font-weight: normal !important; }" , rule .getCssText ());
93+
94+ rule = rules .getRules ().get (6 );
8995 assertEquals ("*.important { font-weight: bold; }" , rule .getCssText ());
9096 }
9197
Original file line number Diff line number Diff line change 1212 impor tant;
1313}
1414
15+ .sel5 {
16+ font-weight : normal !/*really*/ impor tant;
17+ }
18+
19+ .sel6 {
20+ font-weight : normal ! /*really*/ impor tant;
21+ }
22+
1523.important {
1624 font-weight : bold
1725}
You can’t perform that action at this time.
0 commit comments