Add synonyms for name.
This commit is contained in:
		
							parent
							
								
									1351577c5a
								
							
						
					
					
						commit
						da2d7535e8
					
				
							
								
								
									
										17
									
								
								org_mode_samples/affiliated_keyword/all_name.org
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								org_mode_samples/affiliated_keyword/all_name.org
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| #+name: foo | ||||
| : bar | ||||
| 
 | ||||
| #+source: foo | ||||
| : bar | ||||
| 
 | ||||
| #+tblname: foo | ||||
| : bar | ||||
| 
 | ||||
| #+resname: foo | ||||
| : bar | ||||
| 
 | ||||
| #+srcname: foo | ||||
| : bar | ||||
| 
 | ||||
| #+label: foo | ||||
| : bar | ||||
| @ -0,0 +1,2 @@ | ||||
| #+tblname: foo | ||||
| : bar | ||||
							
								
								
									
										2
									
								
								org_mode_samples/greater_element/table/name.org
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								org_mode_samples/greater_element/table/name.org
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | ||||
| #+NAME: foo | ||||
| | foo | bar | | ||||
| @ -280,7 +280,14 @@ pub(crate) fn indentation_level<'b, 'g, 'r, 's>( | ||||
| pub(crate) fn get_name<'s>(affiliated_keywords: &Vec<Keyword<'s>>) -> Option<&'s str> { | ||||
|     let name_keyword = affiliated_keywords | ||||
|         .iter() | ||||
|         .filter(|kw| kw.key.eq_ignore_ascii_case("name")) | ||||
|         .filter(|kw| { | ||||
|             kw.key.eq_ignore_ascii_case("name") | ||||
|                 || kw.key.eq_ignore_ascii_case("source") | ||||
|                 || kw.key.eq_ignore_ascii_case("tblname") | ||||
|                 || kw.key.eq_ignore_ascii_case("resname") | ||||
|                 || kw.key.eq_ignore_ascii_case("srcname") | ||||
|                 || kw.key.eq_ignore_ascii_case("label") | ||||
|         }) | ||||
|         .last(); | ||||
|     name_keyword.map(|kw| kw.value) | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander