Consume trailing whitespace after a plain link.
This commit is contained in:
		
							parent
							
								
									84edd10864
								
							
						
					
					
						commit
						28b2d27054
					
				
							
								
								
									
										1
									
								
								org_mode_samples/README.org
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								org_mode_samples/README.org
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					This folder contains org-mode documents that get automatically included as tests using build.rs.
 | 
				
			||||||
@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					mailto:foo@bar.baz      .
 | 
				
			||||||
@ -11,6 +11,7 @@ use nom::combinator::verify;
 | 
				
			|||||||
use nom::multi::many_till;
 | 
					use nom::multi::many_till;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use super::org_source::OrgSource;
 | 
					use super::org_source::OrgSource;
 | 
				
			||||||
 | 
					use super::util::maybe_consume_object_trailing_whitespace_if_not_exiting;
 | 
				
			||||||
use crate::context::parser_with_context;
 | 
					use crate::context::parser_with_context;
 | 
				
			||||||
use crate::context::ContextElement;
 | 
					use crate::context::ContextElement;
 | 
				
			||||||
use crate::context::ExitClass;
 | 
					use crate::context::ExitClass;
 | 
				
			||||||
@ -61,6 +62,8 @@ pub fn plain_link<'b, 'g, 'r, 's>(
 | 
				
			|||||||
    let (remaining, _separator) = tag(":")(remaining)?;
 | 
					    let (remaining, _separator) = tag(":")(remaining)?;
 | 
				
			||||||
    let (remaining, path) = path_plain(context, remaining)?;
 | 
					    let (remaining, path) = path_plain(context, remaining)?;
 | 
				
			||||||
    peek(parser_with_context!(post)(context))(remaining)?;
 | 
					    peek(parser_with_context!(post)(context))(remaining)?;
 | 
				
			||||||
 | 
					    let (remaining, _trailing_whitespace) =
 | 
				
			||||||
 | 
					        maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
 | 
				
			||||||
    let source = get_consumed(input, remaining);
 | 
					    let source = get_consumed(input, remaining);
 | 
				
			||||||
    Ok((
 | 
					    Ok((
 | 
				
			||||||
        remaining,
 | 
					        remaining,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user