@@ -207,16 +207,16 @@ mod doc {
207207 take_until_and_consume!( delims. comm) ,
208208 take_until_and_consume!( "\n " )
209209 ) )
210- >> desc : opt!( many0!( complete!( map_res!(
210+ >> par : opt!( many0!( complete!( map_res!(
211211 preceded!(
212- take_until_and_consume!( delims. opt ) ,
212+ take_until_and_consume!( delims. params ) ,
213213 take_until_and_consume!( "\n " )
214214 ) ,
215215 as_kv
216216 ) ) ) )
217- >> par : opt!( many0!( complete!( map_res!(
217+ >> desc : opt!( many0!( complete!( map_res!(
218218 preceded!(
219- take_until_and_consume!( delims. params ) ,
219+ take_until_and_consume!( delims. opt ) ,
220220 take_until_and_consume!( "\n " )
221221 ) ,
222222 as_kv
@@ -670,4 +670,23 @@ mod tests {
670670 ) ;
671671 }
672672 }
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+ }
673692}
0 commit comments