mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Don't replace underscores in auto-generated IDs in goldmark (#12805)
Fix #12196 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -34,7 +34,7 @@ func CleanValue(value []byte) []byte {
 | 
			
		||||
	needsDash := false
 | 
			
		||||
	for _, r := range rs {
 | 
			
		||||
		switch {
 | 
			
		||||
		case unicode.IsLetter(r) || unicode.IsNumber(r):
 | 
			
		||||
		case unicode.IsLetter(r) || unicode.IsNumber(r) || r == '_':
 | 
			
		||||
			if needsDash && len(result) > 0 {
 | 
			
		||||
				result = append(result, '-')
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user