mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-01 06:16:46 -06:00
Neutralise CR and form feed in CSS variable export strings
Found while testing crates/engine/src/cmd/variables_io.rs:~92 (css_safe, used by css for String values and mode names) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 5.5
parent
72b4269383
commit
4d47c350c1
@@ -62,7 +62,7 @@ fn export(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
|
||||
/// `text` as a CSS comment or quoted string body.
|
||||
fn css_safe(text: &str) -> String {
|
||||
text.replace("*/", "* /").replace(['"', '\\', '\n'], " ")
|
||||
text.replace("*/", "* /").replace(['"', '\\', '\n', '\r', '\u{c}'], " ")
|
||||
}
|
||||
|
||||
/// Each collection's variables as custom properties (named as generated code names them): the
|
||||
|
||||
Reference in New Issue
Block a user