Skip to content

Commit 676cabf

Browse files
committed
fix tag value
1 parent 4a29149 commit 676cabf

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/main/kotlin/com/github/oldmegit/goframehelper/apiTagValueUtil/Mime.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ object Mime : TagValue {
99
)
1010

1111
override val separator: String
12-
get() = ","
12+
get() = ""
1313
}

src/main/kotlin/com/github/oldmegit/goframehelper/apiTagValueUtil/Validation.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ object Validation : TagValue {
6767
)
6868

6969
override val separator: String
70-
get() = ","
70+
get() = "|"
7171

7272
private fun getTail(key: String): String {
7373
return GfValidationBundle.getMessage(key)

src/main/kotlin/com/github/oldmegit/goframehelper/provider/ApiTagProvider.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,15 @@ class ApiTagProvider: GfProvider() {
139139
val tagValue = valueObject[current] ?: return
140140
val list = tagValue.list
141141
val separator = tagValue.separator
142+
var valueStartIndex = -1
142143

143-
var valueStartIndex = prefix.lastIndexOf(separator)
144+
if (separator != "") {
145+
valueStartIndex = prefix.lastIndexOf(separator)
146+
}
144147
if (valueStartIndex == -1) {
145148
valueStartIndex = prefix.lastIndexOf("\"")
146149
}
150+
147151
val valuePrefixOfTag = prefix.substring(valueStartIndex + 1).lowercase()
148152

149153
for ((k, v) in list) {

0 commit comments

Comments
 (0)