Skip to content

Commit 47ef864

Browse files
committed
Add skip statements to all strings
1 parent a517ea4 commit 47ef864

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+135
-52
lines changed

cmd/micro/highlight/highlighter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func findIndex(regex *regexp.Regexp, skip *regexp.Regexp, str []rune, canMatchSt
7575

7676
var strbytes []byte
7777
if skip != nil {
78-
strbytes = skip.ReplaceAllFunc(strbytes, func(match []byte) []byte {
78+
strbytes = skip.ReplaceAllFunc([]byte(string(str)), func(match []byte) []byte {
7979
res := make([]byte, utf8.RuneCount(match))
8080
return res
8181
})

cmd/micro/runtime.go

+49-49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

runtime/syntax/apacheconf.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ rules:
4747
- constant.string:
4848
start: "\""
4949
end: "\""
50+
skip: "\\\\."
5051
rules:
5152
- constant.specialChar: "\\\\."
5253

runtime/syntax/arduino.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ rules:
7575
- constant.string:
7676
start: "\""
7777
end: "\""
78+
skip: "\\\\."
7879
rules:
7980
- constant.specialChar: "\\\\."
8081

8182
- constant.string:
8283
start: "'"
8384
end: "'"
85+
skip: "\\\\."
8486
rules:
8587
- preproc: "..+"
8688
- constant.specialChar: "\\\\."

runtime/syntax/asm.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,14 @@ rules:
9191
- constant.string:
9292
start: "\""
9393
end: "\""
94+
skip: "\\\\."
9495
rules:
9596
- constant.specialChar: "\\\\."
9697

9798
- constant.string:
9899
start: "'"
99100
end: "'"
101+
skip: "\\\\."
100102
rules:
101103
- constant.specialChar: "\\\\."
102104

runtime/syntax/awk.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ rules:
2525
- constant.string:
2626
start: "\""
2727
end: "\""
28+
skip: "\\\\."
2829
rules:
2930
- constant.specialChar: "\\\\."
3031

3132
- constant.string:
3233
start: "'"
3334
end: "'"
35+
skip: "\\\\."
3436
rules:
3537
- constant.specialChar: "\\\\."
3638

runtime/syntax/c.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ rules:
2828
- constant.string:
2929
start: "\""
3030
end: "\""
31+
skip: "\\\\."
3132
rules:
3233
- constant.specialChar: "\\\\."
3334

3435
- constant.string:
3536
start: "'"
3637
end: "'"
38+
skip: "\\\\."
3739
rules:
3840
- preproc: "..+"
3941
- constant.specialChar: "\\\\."

runtime/syntax/caddyfile.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rules:
1111
- constant.string:
1212
start: "\""
1313
end: "\""
14+
skip: "\\\\."
1415
rules:
1516
- constant.specialChar: "\\\\."
1617

runtime/syntax/clojure.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ rules:
2525
- constant.string:
2626
start: "\""
2727
end: "\""
28+
skip: "\\\\."
2829
rules:
2930
- constant.specialChar: "(\\\\u[0-9A-fa-f]{4,4}|\\\\newline|\\\\space|\\\\tab|\\\\formfeed|\\\\backspace|\\\\return|\\\\.)"
3031

runtime/syntax/cmake.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ rules:
1616
- constant.string:
1717
start: "\""
1818
end: "\""
19+
skip: "\\\\."
1920
rules:
2021
- constant.specialChar: "\\\\."
2122

2223
- constant.string:
2324
start: "'"
2425
end: "'"
26+
skip: "\\\\."
2527
rules:
2628
- constant.specialChar: "\\\\."
2729

runtime/syntax/coffeescript.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ rules:
1717
- constant.string:
1818
start: "\""
1919
end: "\""
20+
skip: "\\\\."
2021
rules:
2122
- constant.specialChar: "\\\\."
2223

runtime/syntax/conf.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ rules:
77
- constant.string:
88
start: "\""
99
end: "\""
10+
skip: "\\\\."
1011
rules: []
1112

1213
- comment:

runtime/syntax/cpp.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ rules:
2929
- constant.string:
3030
start: "\""
3131
end: "\""
32+
skip: "\\\\."
3233
rules:
3334
- constant.specialChar: "\\\\."
3435

3536
- constant.string:
3637
start: "'"
3738
end: "'"
39+
skip: "\\\\."
3840
rules:
3941
- preproc: "..+"
4042
- constant.specialChar: "\\\\."

runtime/syntax/crystal.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,17 @@ rules:
3333
- constant.string:
3434
start: "\""
3535
end: "\""
36+
skip: "\\\\."
3637
rules:
37-
- constant.specialchar: "\\\\."
38+
- constant.specialChar: "\\\\."
3839
- special: "#\\{[^}]*\\}"
3940

4041
- constant.string:
4142
start: "'"
4243
end: "'"
43-
rules: []
44+
skip: "\\\\."
45+
rules:
46+
- constant.specialChar: "\\\\."
4447

4548
- comment:
4649
start: "#"

runtime/syntax/csharp.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ rules:
2424
- constant.string:
2525
start: "\""
2626
end: "\""
27+
skip: "\\\\."
2728
rules:
2829
- constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
2930
- constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"
3031

3132
- constant.string:
3233
start: "'"
3334
end: "'"
35+
skip: "\\\\."
3436
rules:
3537
- constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
3638
- constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"

runtime/syntax/css.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ rules:
2525
- constant.string:
2626
start: "\""
2727
end: "\""
28+
skip: "\\\\."
2829
rules:
2930
- constant.specialChar: "\\\\."
3031
- constant.string:
3132
start: "'"
3233
end: "'"
34+
skip: "\\\\."
3335
rules:
3436
- constant.specialChar: "\\\\."
3537
- special: "\"|'"

runtime/syntax/cython.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ rules:
3333
- constant.string:
3434
start: "\""
3535
end: "\""
36+
skip: "\\\\."
3637
rules:
3738
- constant.specialChar: "\\\\."
3839

3940
- constant.string:
4041
start: "'"
4142
end: "'"
43+
skip: "\\\\."
4244
rules:
4345
- constant.specialChar: "\\\\."
4446

runtime/syntax/d.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ rules:
5353
- constant.string:
5454
start: "\""
5555
end: "\""
56+
skip: "\\\\."
5657
rules:
5758
- constant.specialChar: "\\\\."
5859
# WysiwygString

runtime/syntax/dart.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ rules:
3333
- constant.string:
3434
start: "\""
3535
end: "\""
36+
skip: "\\\\."
3637
rules:
3738
- constant.specialChar: "\\\\."
3839

3940
- constant.string:
4041
start: "'"
4142
end: "'"
43+
skip: "\\\\."
4244
rules:
4345
- constant.specialChar: "\\\\."
4446

runtime/syntax/dockerfile.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ rules:
2323
- constant.string:
2424
start: "\""
2525
end: "\""
26+
skip: "\\\\."
2627
rules:
2728
- constant.specialChar: "\\\\."
2829

2930
- constant.string:
3031
start: "'"
3132
end: "'"
33+
skip: "\\\\."
3234
rules:
3335
- constant.specialChar: "\\\\."
3436

runtime/syntax/dot.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rules:
1111
- constant.string:
1212
start: "\""
1313
end: "\""
14+
skip: "\\\\."
1415
rules:
1516
- constant.specialChar: "\\\\."
1617

runtime/syntax/fish.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ rules:
3030
- constant.string:
3131
start: "\""
3232
end: "\""
33+
skip: "\\\\."
3334
rules:
3435
- constant.specialChar: "\\\\."
3536

3637
- constant.string:
3738
start: "'"
3839
end: "'"
40+
skip: "\\\\."
3941
rules: []
4042

4143
- comment:

runtime/syntax/fortran.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ rules:
4444
- constant.string:
4545
start: "\""
4646
end: "\""
47+
skip: "\\\\."
4748
rules:
4849
- constant.specialChar: "\\\\."
4950

5051
- constant.string:
5152
start: "'"
5253
end: "'"
54+
skip: "\\\\."
5355
rules:
5456
- constant.specialChar: "\\\\."
5557

runtime/syntax/gdscript.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ rules:
4747
- constant.string:
4848
start: "\""
4949
end: "\""
50+
skip: "\\\\."
5051
rules:
5152
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
5253

5354
- constant.string:
5455
start: "'"
5556
end: "'"
57+
skip: "\\\\."
5658
rules:
5759
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
5860

runtime/syntax/gentoo-ebuild.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ rules:
2929
- constant.string:
3030
start: "\""
3131
end: "\""
32+
skip: "\\\\."
3233
rules:
3334
- constant.specialChar: "\\\\."
3435

3536
- constant.string:
3637
start: "'"
3738
end: "'"
39+
skip: "\\\\."
3840
rules:
3941
- constant.specialChar: "\\\\."
4042

runtime/syntax/go.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ rules:
3030
- constant.string:
3131
start: "\""
3232
end: "\""
33+
skip: "\\\\."
3334
rules:
3435
- constant.specialChar: "%."
3536
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
@@ -38,6 +39,7 @@ rules:
3839
- constant.string:
3940
start: "'"
4041
end: "'"
42+
skip: "\\\\."
4143
rules:
4244
- error: "..+"
4345
- constant.specialChar: "%."

runtime/syntax/golo.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ rules:
4848
- constant.string:
4949
start: "\""
5050
end: "\""
51+
skip: "\\\\."
5152
rules:
5253
- constant.specialChar: "\\\\."
5354

5455
- constant.string:
5556
start: "'"
5657
end: "'"
58+
skip: "\\\\."
5759
rules:
5860
- constant.specialChar: "\\\\."
5961

runtime/syntax/haskell.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ rules:
3030
- constant.string:
3131
start: "\""
3232
end: "\""
33+
skip: "\\\\."
3334
rules:
3435
- constant.specialChar: "\\\\."
3536

runtime/syntax/html.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rules:
1111
- constant.string:
1212
start: "\""
1313
end: "\""
14+
skip: "\\\\."
1415
rules:
1516
- constant.specialChar: "\\\\."
1617

runtime/syntax/java.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ rules:
1313
- constant.string:
1414
start: "\""
1515
end: "\""
16+
skip: "\\\\."
1617
rules:
1718
- constant.specialChar: "\\\\."
1819

1920
- constant.string:
2021
start: "'"
2122
end: "'"
23+
skip: "\\\\."
2224
rules:
2325
- preproc: "..+"
2426
- constant.specialChar: "\\\\."

runtime/syntax/javascript.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ rules:
2222
- constant.string:
2323
start: "\""
2424
end: "\""
25+
skip: "\\\\."
2526
rules:
2627
- constant.specialChar: "\\\\."
2728

2829
- constant.string:
2930
start: "'"
3031
end: "'"
32+
skip: "\\\\."
3133
rules:
3234
- constant.specialChar: "\\\\."
3335

0 commit comments

Comments
 (0)