File tree Expand file tree Collapse file tree 1 file changed +30
-27
lines changed Expand file tree Collapse file tree 1 file changed +30
-27
lines changed Original file line number Diff line number Diff line change @@ -182,34 +182,37 @@ module Lexer = {
182
182
let groups = RegExp .Result .matches (result )
183
183
switch groups [1 ] {
184
184
| Some (str ) =>
185
- switch String .split (str -> Option .getUnsafe , ";" ) {
186
- | ["0" ] => ClearSgr ({loc , raw })
187
- | other =>
188
- let params = Array .map (other , s =>
189
- switch s {
190
- | "1" => Bold
191
- | "30" => Fg (Black )
192
- | "31" => Fg (Red )
193
- | "32" => Fg (Green )
194
- | "33" => Fg (Yellow )
195
- | "34" => Fg (Blue )
196
- | "35" => Fg (Magenta )
197
- | "36" => Fg (Cyan )
198
- | "37" => Fg (White )
199
- | "40" => Bg (Black )
200
- | "41" => Bg (Red )
201
- | "42" => Bg (Green )
202
- | "43" => Bg (Yellow )
203
- | "44" => Bg (Blue )
204
- | "45" => Bg (Magenta )
205
- | "46" => Bg (Cyan )
206
- | "47" => Bg (White )
207
- | o => Unknown (o )
208
- }
209
- )
210
- Sgr ({loc , raw , params })
185
+ switch str {
186
+ | Some (str ) =>
187
+ switch String .split (str , ";" ) {
188
+ | ["0" ] => ClearSgr ({loc , raw })
189
+ | other =>
190
+ let params = Array .map (other , s =>
191
+ switch s {
192
+ | "1" => Bold
193
+ | "30" => Fg (Black )
194
+ | "31" => Fg (Red )
195
+ | "32" => Fg (Green )
196
+ | "33" => Fg (Yellow )
197
+ | "34" => Fg (Blue )
198
+ | "35" => Fg (Magenta )
199
+ | "36" => Fg (Cyan )
200
+ | "37" => Fg (White )
201
+ | "40" => Bg (Black )
202
+ | "41" => Bg (Red )
203
+ | "42" => Bg (Green )
204
+ | "43" => Bg (Yellow )
205
+ | "44" => Bg (Blue )
206
+ | "45" => Bg (Magenta )
207
+ | "46" => Bg (Cyan )
208
+ | "47" => Bg (White )
209
+ | o => Unknown (o )
210
+ }
211
+ )
212
+ Sgr ({loc , raw , params })
213
+ }
214
+ | None => Sgr ({loc , raw , params : []})
211
215
}
212
-
213
216
| None => Sgr ({loc , raw , params : []})
214
217
}
215
218
| None => Sgr ({loc , raw , params : []})
You can’t perform that action at this time.
0 commit comments