typegen: fix .s in type references
This commit is contained in:
		
							parent
							
								
									fe17f4adbb
								
							
						
					
					
						commit
						1f47b15963
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -650,13 +650,12 @@ fn parse_details(comment: Comment) -> String {
 | 
			
		|||
					let separators = [
 | 
			
		||||
						('$', true),
 | 
			
		||||
						(' ', false),
 | 
			
		||||
						('.', false),
 | 
			
		||||
						(',', false),
 | 
			
		||||
						(';', false),
 | 
			
		||||
						(':', false),
 | 
			
		||||
					];
 | 
			
		||||
 | 
			
		||||
					let (end, ty) = src.chars().enumerate()
 | 
			
		||||
					let (mut end, mut ty) = src.chars().enumerate()
 | 
			
		||||
						.find_map(|(i, char)| {
 | 
			
		||||
							separators.iter()
 | 
			
		||||
								.find(|(sc, _)| char == *sc)
 | 
			
		||||
| 
						 | 
				
			
			@ -678,6 +677,11 @@ fn parse_details(comment: Comment) -> String {
 | 
			
		|||
							prop
 | 
			
		||||
						})
 | 
			
		||||
						.unwrap_or("");
 | 
			
		||||
					// special case for . as it is contained in valid types as well
 | 
			
		||||
					if ty.ends_with('.') {
 | 
			
		||||
						end -= 1;
 | 
			
		||||
						ty = &ty[..ty.len() - 1];
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					let (prop, func, signal) = match member {
 | 
			
		||||
						name if name.ends_with("()") => ("", &name[..name.len() - 2], ""),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue