Do not include whitespace at the end of value.
This commit is contained in:
		
							parent
							
								
									1a2f0856da
								
							
						
					
					
						commit
						37bc5ef712
					
				
							
								
								
									
										4
									
								
								org_mode_samples/object/macro/whitespace_in_args.org
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								org_mode_samples/object/macro/whitespace_in_args.org
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| {{{foo(bar  baz)}}} | ||||
| 
 | ||||
| {{{foo(bar | ||||
| baz)}}} | ||||
| @ -3082,7 +3082,7 @@ fn compare_org_macro<'b, 's>( | ||||
|         ), | ||||
|         ( | ||||
|             EmacsField::Required(":value"), | ||||
|             |r| Some(r.source), | ||||
|             |r| Some(r.macro_value), | ||||
|             compare_property_quoted_string | ||||
|         ), | ||||
|         ( | ||||
|  | ||||
| @ -26,6 +26,7 @@ pub(crate) fn org_macro<'b, 'g, 'r, 's>( | ||||
|     let (remaining, macro_name) = org_macro_name(context, remaining)?; | ||||
|     let (remaining, macro_args) = opt(parser_with_context!(org_macro_args)(context))(remaining)?; | ||||
|     let (remaining, _) = tag("}}}")(remaining)?; | ||||
|     let macro_value = get_consumed(input, remaining); | ||||
|     let (remaining, _trailing_whitespace) = | ||||
|         maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?; | ||||
| 
 | ||||
| @ -40,6 +41,7 @@ pub(crate) fn org_macro<'b, 'g, 'r, 's>( | ||||
|                 .into_iter() | ||||
|                 .map(|arg| arg.into()) | ||||
|                 .collect(), | ||||
|             macro_value: Into::<&str>::into(macro_value), | ||||
|         }, | ||||
|     )) | ||||
| } | ||||
|  | ||||
| @ -150,6 +150,7 @@ pub struct OrgMacro<'s> { | ||||
|     pub source: &'s str, | ||||
|     pub macro_name: &'s str, | ||||
|     pub macro_args: Vec<&'s str>, | ||||
|     pub macro_value: &'s str, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug, PartialEq)] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander