Allow whitespace-only custom property values.

This commit is contained in:
Simon Sapin 2015-09-07 16:48:07 +02:00
parent c7622bf22f
commit ab9e1af206
8 changed files with 5 additions and 23 deletions

View file

@ -48,10 +48,13 @@ pub fn parse(input: &mut Parser) -> Result<Value, ()> {
pub fn parse_declaration_value(input: &mut Parser, references: &mut Option<HashSet<Name>>) pub fn parse_declaration_value(input: &mut Parser, references: &mut Option<HashSet<Name>>)
-> Result<(), ()> { -> Result<(), ()> {
input.parse_until_before(Delimiter::Bang | Delimiter::Semicolon, |input| { input.parse_until_before(Delimiter::Bang | Delimiter::Semicolon, |input| {
if input.is_exhausted() { // Need at least one token
// Need at least one token let start_position = input.position();
if input.next_including_whitespace().is_err() {
return Err(()) return Err(())
} }
input.reset(start_position);
parse_declaration_value_block(input, references) parse_declaration_value_block(input, references)
}) })
} }

View file

@ -1,3 +0,0 @@
[variable-declaration-08.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[variable-declaration-26.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[variable-declaration-37.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[variable-reference-03.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[variable-reference-04.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[variable-reference-26.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[variable-reference-27.htm]
type: reftest
expected: FAIL