@@ -182,16 +182,16 @@ mod doc {
182
182
take_until_and_consume!( delims. comm) ,
183
183
take_until_and_consume!( "\n " )
184
184
) )
185
- >> desc : opt!( many0!( complete!( map_res!(
185
+ >> par : opt!( many0!( complete!( map_res!(
186
186
preceded!(
187
- take_until_and_consume!( delims. opt ) ,
187
+ take_until_and_consume!( delims. params ) ,
188
188
take_until_and_consume!( "\n " )
189
189
) ,
190
190
as_kv
191
191
) ) ) )
192
- >> par : opt!( many0!( complete!( map_res!(
192
+ >> desc : opt!( many0!( complete!( map_res!(
193
193
preceded!(
194
- take_until_and_consume!( delims. params ) ,
194
+ take_until_and_consume!( delims. opt ) ,
195
195
take_until_and_consume!( "\n " )
196
196
) ,
197
197
as_kv
@@ -663,4 +663,23 @@ mod tests {
663
663
) ;
664
664
}
665
665
}
666
+
667
+ #[ test]
668
+ fn param_and_input ( ) {
669
+ let sample = "#\"
670
+ # mp()
671
+ # Convert from markdown to docx
672
+ # @param input: markdown file to convert
673
+ # - MSG: the message to pass
674
+ #;
675
+ " ;
676
+ let delims = Delimiters :: get_delims ( ) ;
677
+ let x = Extracted {
678
+ content : sample. into ( ) ,
679
+ position : Span :: new ( CompleteStr ( sample) )
680
+ } ;
681
+
682
+ let val = generate_doc_file ( & [ x] , Path :: new ( "/example.txt" ) , delims) ;
683
+ println ! ( "{:#?}" , val) ;
684
+ }
666
685
}
0 commit comments