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

LibWeb: Store stylesheet sources as StringViews

This commit is contained in:
Sam Atkins 2023-02-17 13:00:40 +00:00 committed by Linus Groh
parent 13d2111b74
commit faab2fe101
2 changed files with 8 additions and 9 deletions

View file

@ -1,10 +1,11 @@
#!/bin/sh
echo "#include <AK/StringView.h>"
echo "namespace Web::CSS {"
echo "extern const char $1[];"
echo "const char $1[] = \"\\"
echo "extern StringView $1;"
echo "StringView $1 = \"\\"
grep -v '^ *#' < "$2" | while IFS= read -r line; do
echo "$line""\\"
done
echo "\";"
echo "\"sv;"
echo "}"