File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 24
24
//! is with the previous two variants of this (i.e., ++label and -+label).
25
25
//! - <label>
26
26
//!
27
- //! <label>: \S+
27
+ //! <label>:
28
+ //! - \S+
29
+ //! - ".+"
28
30
//! ```
29
31
30
32
use crate :: error:: Error ;
@@ -84,7 +86,7 @@ impl std::ops::Deref for Label {
84
86
impl LabelDelta {
85
87
fn parse < ' a > ( input : & mut Tokenizer < ' a > ) -> Result < LabelDelta , Error < ' a > > {
86
88
let delta = match input. peek_token ( ) ? {
87
- Some ( Token :: Word ( delta) ) => {
89
+ Some ( Token :: Word ( delta) | Token :: Quote ( delta ) ) => {
88
90
input. next_token ( ) ?;
89
91
delta
90
92
}
@@ -273,3 +275,15 @@ fn parse_shorter_command_with_to_colon() {
273
275
] ) )
274
276
) ;
275
277
}
278
+
279
+ #[ test]
280
+ fn parse_quote ( ) {
281
+ assert_eq ! (
282
+ parse( "labels +T-compiler \" -good first issue\" \" good first issue\" " ) ,
283
+ Ok ( Some ( vec![
284
+ LabelDelta :: Add ( Label ( "T-compiler" . into( ) ) ) ,
285
+ LabelDelta :: Remove ( Label ( "good first issue" . into( ) ) ) ,
286
+ LabelDelta :: Add ( Label ( "good first issue" . into( ) ) ) ,
287
+ ] ) )
288
+ ) ;
289
+ }
You can’t perform that action at this time.
0 commit comments