"em { color: rgba(100%,0%,0%,1) } /* the same, with explicit opacity of 1 */\n",
"p { color: rgba(0,0,255,0.5) } /* semi-transparent solid blue */\n",
"p { color: rgba(100%, 50%, 0%, 0.1) } /* very transparent solid orange */",
+ ".chat-icon[_ng-cnj-c0]::before{content:url(group-2.63e87cd21fbf8c966dd.svg);width:60px;height:60px;display:block}",
+ "tt{color:#1e3482}",
};
rspamd_mempool_t *pool = rspamd_mempool_new(rspamd_mempool_suggest_size(),
/*
* Consume functions: return a token and advance lexer offset
*/
-auto css_tokeniser::consume_ident() -> struct css_parser_token
+auto css_tokeniser::consume_ident(bool allow_number) -> struct css_parser_token
{
auto i = offset;
auto need_escape = false;
while (i < input.size()) {
auto c = input[i];
- auto is_plain_c = allow_middle_minus ? is_plain_ident(c) :
+ auto is_plain_c = (allow_number || allow_middle_minus) ? is_plain_ident(c) :
is_plain_ident_start(c);
if (!is_plain_c) {
if (c == '\\' && i + 1 < input.size ()) {
case '\r':
case '\v': {
/* Consume as much space as we can */
- while (i < input.size() && g_ascii_isspace(c)) {
- c = input[i++];
+ while (i < input.size() && g_ascii_isspace(input[i])) {
+ i++;
}
auto ret = make_token<css_parser_token::token_type::whitespace_token>(
if ((is_plain_ident(next_c) || next_c == '-') &&
(is_plain_ident(next_next_c) || next_next_c == '-')) {
offset = i + 1;
- auto ident_token = consume_ident();
+ /* We consume indent, but we allow numbers there */
+ auto ident_token = consume_ident(true);
if (ident_token.type == css_parser_token::token_type::ident_token) {
/* Update type */
mutable std::list<css_parser_token> backlog;
auto consume_number() -> struct css_parser_token;
- auto consume_ident() -> struct css_parser_token;
+ auto consume_ident(bool allow_number = false) -> struct css_parser_token;
};
}