@@ -207,16 +207,16 @@ mod doc {
207
207
take_until_and_consume!( delims. comm) ,
208
208
take_until_and_consume!( "\n " )
209
209
) )
210
- >> desc : opt!( many0!( complete!( map_res!(
210
+ >> par : opt!( many0!( complete!( map_res!(
211
211
preceded!(
212
- take_until_and_consume!( delims. opt ) ,
212
+ take_until_and_consume!( delims. params ) ,
213
213
take_until_and_consume!( "\n " )
214
214
) ,
215
215
as_kv
216
216
) ) ) )
217
- >> par : opt!( many0!( complete!( map_res!(
217
+ >> desc : opt!( many0!( complete!( map_res!(
218
218
preceded!(
219
- take_until_and_consume!( delims. params ) ,
219
+ take_until_and_consume!( delims. opt ) ,
220
220
take_until_and_consume!( "\n " )
221
221
) ,
222
222
as_kv
@@ -670,4 +670,23 @@ mod tests {
670
670
) ;
671
671
}
672
672
}
673
+
674
+ #[ test]
675
+ fn param_and_input ( ) {
676
+ let sample = "#\"
677
+ # mp()
678
+ # Convert from markdown to docx
679
+ # @param input: markdown file to convert
680
+ # - MSG: the message to pass
681
+ #;
682
+ " ;
683
+ let delims = Delimiters :: get_delims ( ) ;
684
+ let x = Extracted {
685
+ content : sample. into ( ) ,
686
+ position : Span :: new ( CompleteStr ( sample) )
687
+ } ;
688
+
689
+ let val = generate_doc_file ( & [ x] , Path :: new ( "/example.txt" ) , delims) ;
690
+ println ! ( "{:#?}" , val) ;
691
+ }
673
692
}
0 commit comments