@@ -47,32 +47,26 @@ impl Commands {
47
47
state = add_space ( & mut self . state_machine , state, i) ;
48
48
state = add_quoted_dynamic_segment ( & mut self . state_machine , state) ;
49
49
param_names. push ( & segment[ 1 ..segment. len ( ) - 1 ] ) ;
50
-
51
50
} else if segment. starts_with ( "```rust\n " ) && segment. ends_with ( "\n ```" ) {
52
51
state = add_space ( & mut self . state_machine , state, i) ;
53
52
state = add_code_segment1 ( & mut self . state_machine , state) ;
54
53
param_names. push ( & segment[ 8 ..segment. len ( ) - 4 ] ) ;
55
-
56
54
} else if segment. starts_with ( "```" ) && segment. ends_with ( "```" ) {
57
55
state = add_space ( & mut self . state_machine , state, i) ;
58
56
state = add_code_segment2 ( & mut self . state_machine , state) ;
59
57
param_names. push ( & segment[ 3 ..segment. len ( ) - 3 ] ) ;
60
-
61
58
} else if segment. starts_with ( "`" ) && segment. ends_with ( "`" ) {
62
59
state = add_space ( & mut self . state_machine , state, i) ;
63
60
state = add_code_segment3 ( & mut self . state_machine , state) ;
64
61
param_names. push ( & segment[ 1 ..segment. len ( ) - 1 ] ) ;
65
-
66
62
} else if segment. starts_with ( "{" ) && segment. ends_with ( "}" ) {
67
63
state = add_space ( & mut self . state_machine , state, i) ;
68
64
state = add_dynamic_segment ( & mut self . state_machine , state) ;
69
65
param_names. push ( & segment[ 1 ..segment. len ( ) - 1 ] ) ;
70
-
71
66
} else if segment. ends_with ( "..." ) {
72
67
state = add_space ( & mut self . state_machine , state, i) ;
73
68
state = add_remaining_segment ( & mut self . state_machine , state) ;
74
69
param_names. push ( & segment[ ..segment. len ( ) - 3 ] ) ;
75
-
76
70
} else {
77
71
state = add_space ( & mut self . state_machine , state, i) ;
78
72
segment. chars ( ) . for_each ( |ch| {
@@ -180,7 +174,6 @@ fn add_code_segment1(state_machine: &mut StateMachine, mut state: usize) -> usiz
180
174
state
181
175
}
182
176
183
-
184
177
#[ inline]
185
178
fn add_code_segment2 ( state_machine : & mut StateMachine , mut state : usize ) -> usize {
186
179
state = state_machine. add ( state, CharacterSet :: from_char ( '`' ) ) ;
0 commit comments