summaryrefslogtreecommitdiff
path: root/src/parse/parse.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-12-01 12:14:46 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-12-01 12:14:46 +0000
commit682a216c41d55a0c8d76297f2411277b6c699e39 (patch)
treefd92373a13382fa0c0d9d414095d5d7209fd79af /src/parse/parse.c
parent1fb312312cdd01b3cf59950eacc7762f01c41a50 (diff)
downloadlibcss-682a216c41d55a0c8d76297f2411277b6c699e39.tar.gz
libcss-682a216c41d55a0c8d76297f2411277b6c699e39.tar.bz2
Add end-block-content parse event
In order to cope with a situation where a block ends with a selector which has no ruleset, add an end-block-content event and in handling it, pop any intermediate states off the language stack so that we're in block mode by the time the event is completed. This fixes an assert situation caused by a ruleset such as: @media screen { dodgy } .outer { top: 10px; } Which has been encountered in the wild (likely a typo). Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/parse/parse.c')
-rw-r--r--src/parse/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse/parse.c b/src/parse/parse.c
index cbd8b56..d7cb357 100644
--- a/src/parse/parse.c
+++ b/src/parse/parse.c
@@ -1388,7 +1388,7 @@ css_error parseBlockContent(css_parser *parser)
#endif
if (parser->event != NULL) {
parser->event(
- CSS_PARSER_BLOCK_CONTENT,
+ CSS_PARSER_END_BLOCK_CONTENT,
parser->tokens,
parser->event_pw);
}