1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

LibWeb: Escape quotes in style sheet sources

Some rules in style sheets contain quotes, escaping them allows us to
generate code that actually compiles for them.
This commit is contained in:
Jonah 2023-07-30 17:37:40 -05:00 committed by Sam Atkins
parent 442602bec8
commit fd0ee8ae7b

View file

@ -5,7 +5,7 @@ echo "namespace Web::CSS {"
echo "extern StringView $1;"
echo "StringView $1 = \"\\"
grep -v '^ *#' < "$2" | while IFS= read -r line; do
echo "$line""\\"
echo "$line""\\" | sed 's/"/\\\"/g'
done
echo "\"sv;"
echo "}"