Remove space before ; delimiter in SCSS if() function (#19384)

Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
Konv Suuandfisker authored and GitHub committed 2026-06-16 15:05:02 +08:00
1 parent a42e063d5c
commit 45f6a5ff0f
6 files changed
+119

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
$a: if(sass($x): 1; else: white);
$a: if(sass($x): 1 ; else: white);
$b: if(sass($x): map.get($view, background); else: white);
$c: if(sass($x): map.get($view, background) ; else: white);
@debug if(sass(true): 10px; else: 15px);
@debug if(sass(true): 10px ; else: 15px);
@debug if(sass(meta.variable-defined($var)): $var);
@mixin foo($isDark, $view) {
.bar {
background-color: if(sass($isDark): map.get($view, background) ; else: white);
}
}
@@ -0,0 +1,42 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`19355.scss format 1`] = `
====================================options=====================================
parsers: ["scss"]
printWidth: 80 (default) |
=====================================input======================================
$a: if(sass($x): 1; else: white);
$a: if(sass($x): 1 ; else: white);
$b: if(sass($x): map.get($view, background); else: white);
$c: if(sass($x): map.get($view, background) ; else: white);
@debug if(sass(true): 10px; else: 15px);
@debug if(sass(true): 10px ; else: 15px);
@debug if(sass(meta.variable-defined($var)): $var);
@mixin foo($isDark, $view) {
.bar {
background-color: if(sass($isDark): map.get($view, background) ; else: white);
}
}
=====================================output=====================================
$a: if(sass($x): 1; else: white);
$a: if(sass($x): 1; else: white);
$b: if(sass($x): map.get($view, background); else: white);
$c: if(sass($x): map.get($view, background); else: white);
@debug if(sass(true): 10px; else: 15px);
@debug if(sass(true): 10px; else: 15px);
@debug if(sass(meta.variable-defined($var)): $var);
@mixin foo($isDark, $view) {
.bar {
background-color: if(
sass($isDark): map.get($view, background); else: white
);
}
}
================================================================================
`;
@@ -0,0 +1 @@
runFormatTest(import.meta, ["scss"]);