summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-19 17:39:50 -0500
committerUnknwon <u@gogs.io>2016-02-19 17:39:50 -0500
commit341da3cea7b194e74057612efc6fb97cb57f1446 (patch)
treea4d74dc2ad864de6a0c6a00797d2ebaec5ea9354
parent716209563532587928099b33f0481d44fbf78c46 (diff)
downloadgitea-341da3cea7b194e74057612efc6fb97cb57f1446.tar.gz
gitea-341da3cea7b194e74057612efc6fb97cb57f1446.zip
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.
-rw-r--r--README.md2
-rw-r--r--gogs.go2
-rw-r--r--modules/base/markdown.go4
-rw-r--r--templates/.VERSION2
4 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 34493f5161..415e036b40 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
-##### Current version: 0.8.38
+##### Current version: 0.8.39
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|
diff --git a/gogs.go b/gogs.go
index 8765344ab2..4c9a627dea 100644
--- a/gogs.go
+++ b/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())
diff --git a/modules/base/markdown.go b/modules/base/markdown.go
index dac51ebc27..10158edd32 100644
--- a/modules/base/markdown.go
+++ b/modules/base/markdown.go
@@ -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
}
}
diff --git a/templates/.VERSION b/templates/.VERSION
index 21926c1afb..bbea7d5964 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.8.38.0217 \ No newline at end of file
+0.8.39.0219 \ No newline at end of file