UnstableChanges

Summary

  1. Add end-block-content parse event (details)
  2. tests: Add test for dodgy media block (details)
Commit 682a216c41d55a0c8d76297f2411277b6c699e39 by dsilvers
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>
The file was modifiedsrc/parse/parse.c (diff)
The file was modifiedsrc/parse/language.c (diff)
The file was modifiedsrc/parse/parse.h (diff)
Commit 54ddec960162bb055b7dc50b1314763fbf763b60 by dsilvers
tests: Add test for dodgy media block
To ensure we don't regress and fail on media blocks which end with
selectors with no ruleset, add a test to that effect.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
The file was modifiedtest/data/parse2/INDEX (diff)
The file was addedtest/data/parse2/dodgy-media-block.dat (diff)