mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 16:12:24 -05:00 
			
		
		
		
	fixed a few things
This commit is contained in:
		
					parent
					
						
							
								884d0ecc8f
							
						
					
				
			
			
				commit
				
					
						3ba528120c
					
				
			
		
					 6 changed files with 92 additions and 106 deletions
				
			
		|  | @ -35,8 +35,10 @@ const ( | |||
| ) | ||||
| 
 | ||||
| var ( | ||||
| 	mentionNameRegexString = `@([a-zA-Z0-9_]+)(?:@([a-zA-Z0-9_\-\.]+)?)` | ||||
| 	mentionNameRegex = regexp.MustCompile(fmt.Sprintf(`^%s$`, mentionNameRegexString)) | ||||
| 	mentionNameRegexString = `^@([a-zA-Z0-9_]+)(?:@([a-zA-Z0-9_\-\.]+)?)$` | ||||
| 	// mention name regex captures the username and domain part from a mention string | ||||
| 	// such as @whatever_user@example.org, returning whatever_user and example.org (without the @ symbols) | ||||
| 	mentionNameRegex = regexp.MustCompile(mentionNameRegexString) | ||||
| 
 | ||||
| 	// mention regex can be played around with here: https://regex101.com/r/qwM9D3/1 | ||||
| 	mentionFinderRegexString = `(?: |^|\W)(@[a-zA-Z0-9_]+(?:@[a-zA-Z0-9_\-\.]+)?)(?: |\n)` | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue