mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Fix inappropriate markdown post process end tag check
When <code> is nested inside <pre>, the next end tag token would not able to be the same as outer-most start tag. So we only check outer-most start and end tag token to be the same.
This commit is contained in:
		@@ -3,7 +3,7 @@ Gogs - Go Git Service [
 | 
			
		||||
 | 
			
		||||
##### Current version: 0.8.38
 | 
			
		||||
##### Current version: 0.8.39
 | 
			
		||||
 | 
			
		||||
| Web | UI  | Preview  |
 | 
			
		||||
|:-------------:|:-------:|:-------:|
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							@@ -17,7 +17,7 @@ import (
 | 
			
		||||
	"github.com/gogits/gogs/modules/setting"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const APP_VER = "0.8.38.0217"
 | 
			
		||||
const APP_VER = "0.8.39.0219"
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	runtime.GOMAXPROCS(runtime.NumCPU())
 | 
			
		||||
 
 | 
			
		||||
@@ -303,10 +303,10 @@ OUTER_LOOP:
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					// If this is the close tag to the outer-most, we are done
 | 
			
		||||
					if token.Type == html.EndTagToken && strings.EqualFold(tagName, token.Data) {
 | 
			
		||||
					if token.Type == html.EndTagToken {
 | 
			
		||||
						stackNum--
 | 
			
		||||
 | 
			
		||||
						if stackNum == 0 {
 | 
			
		||||
						if stackNum <= 0 && strings.EqualFold(tagName, token.Data) {
 | 
			
		||||
							break
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +1 @@
 | 
			
		||||
0.8.38.0217
 | 
			
		||||
0.8.39.0219
 | 
			
		||||
		Reference in New Issue
	
	Block a user