You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,10 +36,16 @@ const js = strip(ts);
36
36
<input bind:value/>
37
37
```
38
38
39
-
## Limitations
39
+
## Formatting
40
+
41
+
By default `sv-strip` will remove leading and trailing whitespace when removing nodes. This will result in an output that is correctly formatted (with a small performance penalty).
42
+
43
+
If you are doing your own formatting you can disable this behavior with the `format` option like so:
44
+
```ts
45
+
const js =strip(ts, { format: false });
46
+
```
40
47
41
-
### Formatting
42
-
`sv-strip` doesn't format the code so we recommend running the output through a formatter to prevent unnecessary (and ugly) whitespace in your code.
0 commit comments