File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## 需要知道更多信息
4
4
5
- https://github.com/tailwindlabs/tailwindcss/blob/437579d3f010a98ae4b824a7d5694486119fbdcd/crates/oxide/src/lib.rs#L108
5
+
6
6
7
7
现在的情况, ` tailwindcss ` 在从文件/内容中提取出 ` Candidate ` 的时候,是仅仅提取出一些字符串的信息。
8
8
@@ -21,15 +21,15 @@ interface Candidate {
21
21
22
22
这样我们就能进行精确的修改,比如:
23
23
24
- ``` jsx title="before"
25
- const className = ` gap-y-4 bg-zinc-800/30` ;
24
+ ``` diff filename="diff"
25
+ // before
26
+ - const className = `gap-y-4 bg-zinc-800/30`;
27
+ // after
28
+ + const className = `a b`;
26
29
```
27
30
28
- ``` js title="after"
29
- const className = ` a b` ;
30
- ```
31
31
32
- 不然现在去进行修改的话,只能所有的文件都去应用 整个 ` Candidates ` (` Set<string> ` ) 进行替换来修改,这往往会导致很多的误伤。
32
+ 不然现在去进行修改的话,只能所有的文件都去应用 整个 ` Candidates ` \ (` Set<string> ` \ ) 进行替换来修改,这往往会导致很多的误伤。
33
33
34
34
而有了这个,我们只需要找到对应的文件,修改它的 ` start ` 和 ` end ` 对应的节点就能达到目的了
35
35
@@ -43,6 +43,8 @@ const className = `a b`;
43
43
44
44
## Tailwindcss v4
45
45
46
+ https://github.com/tailwindlabs/tailwindcss/blob/437579d3f010a98ae4b824a7d5694486119fbdcd/crates/oxide/src/lib.rs#L108
47
+
46
48
``` rs
47
49
pub fn scan (& mut self ) -> Vec <String > {
48
50
init_tracing ();
You can’t perform that action at this time.
0 commit comments