-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
parse_declarations! splits blocks on semicolons unless the the semicolon appears inside parentheses. Because there's no equivalent exception for quotation marks, strings containing semicolons get split. This means we lose any text after the semicolon.
For example, this CSS
.test-1 {
display: grid;
content: "I came; I saw; I conquered.";
}gets split into the following declarations, eating a chunk of the content value:
rules:
#<CssParser::RuleSet:0x0000000122194150
@declarations=
#<CssParser::RuleSet::Declarations:0x0000000122193d18
@declarations=
{"display" => #<CssParser::RuleSet::Declarations::Value:0x00000001221932c8 @important=false, @value="grid">,
"content" => #<CssParser::RuleSet::Declarations::Value:0x0000000122192dc8 @important=false, @value="\"I came">}>,
@selectors=[".test-1"],
@specificity=nil>}]
Metadata
Metadata
Assignees
Labels
No labels