diff --git a/include/orcus/css_parser.hpp b/include/orcus/css_parser.hpp index 2a31ae0a7a40706f681c8c85d4c4816fcdb6568a..c2ffc9d89f7195a2a98cb0d46054960d7bf43007 100644 --- a/include/orcus/css_parser.hpp +++ b/include/orcus/css_parser.hpp @@ -42,7 +42,7 @@ private: void simple_selector_name(); void property_name(); void property(); - void quoted_value(); + void quoted_value(char c); void value(); void function_value(const char* p, size_t len); void function_rgb(bool alpha); @@ -314,12 +314,12 @@ void css_parser<_Handler>::property() } template -void css_parser<_Handler>::quoted_value() +void css_parser<_Handler>::quoted_value(char c) { // Parse until the the end quote is reached. const char* p = nullptr; size_t len = 0; - literal(p, len, '"'); + literal(p, len, c); next(); skip_blanks(); @@ -335,9 +335,9 @@ void css_parser<_Handler>::value() { assert(has_char()); char c = cur_char(); - if (c == '"') + if (c == '"' || c == '\'') { - quoted_value(); + quoted_value(c); return; } diff --git a/test/css/basic8.css b/test/css/basic8.css index 15ef2cf9451732622747cbbbe5e6282af2ababd7..f467bef4440d5035b8b104bc4cd92e37a717f02d 100644 --- a/test/css/basic8.css +++ b/test/css/basic8.css @@ -11,5 +11,5 @@ } .ribbon::after::selection { - content: "Selected orange box."; + content: 'Selected orange box.'; }