Add a test showing the footnote exit matcher is not handling multiple blank lines properly.
This commit is contained in:
		
							parent
							
								
									6fdd613bed
								
							
						
					
					
						commit
						895ee9f3b6
					
				| @ -124,4 +124,31 @@ line footnote."; | ||||
| line footnote." | ||||
|         ); | ||||
|     } | ||||
| 
 | ||||
|     #[test] | ||||
|     fn multiline_break() { | ||||
|         let input = "[fn:2] A multi-
 | ||||
| 
 | ||||
| line footnote. | ||||
| 
 | ||||
| 
 | ||||
| not in the footnote.";
 | ||||
|         let initial_context: ContextTree<'_, '_> = ContextTree::new(); | ||||
|         let document_context = | ||||
|             initial_context.with_additional_node(ContextElement::DocumentRoot(input)); | ||||
|         let footnote_definition_matcher = | ||||
|             parser_with_context!(footnote_definition)(&document_context); | ||||
|         let (remaining, first_footnote_definition) = | ||||
|             footnote_definition_matcher(input).expect("Parse first footnote_definition"); | ||||
|         assert_eq!(remaining, "not in the footnote."); | ||||
|         assert_eq!( | ||||
|             first_footnote_definition.source, | ||||
|             "[fn:2] A multi-
 | ||||
| 
 | ||||
| line footnote. | ||||
| 
 | ||||
| 
 | ||||
| " | ||||
|         ); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -33,3 +33,6 @@ foo bar | ||||
| [fn:2] A multi- | ||||
| 
 | ||||
| line footnote. | ||||
| 
 | ||||
| 
 | ||||
| not in the footnote. | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander