mirror of
https://github.com/prymitive/karma
synced 2026-08-23 11:56:20 +00:00
fix(backend): fix links with spaces
This commit is contained in:
committed by
Łukasz Mierzwa
parent
b9ae3d9b3d
commit
46b566a92b
@@ -81,6 +81,8 @@ var linkSchemes = []string{
|
||||
}
|
||||
|
||||
func isLink(s string) bool {
|
||||
s = strings.TrimSpace(s)
|
||||
|
||||
if strings.Contains(s, " ") {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ var annotationMapsTestCases = []annotationMapsTestCase{
|
||||
annotationMap: map[string]string{
|
||||
"foo": "https://localhost/xxx",
|
||||
"abc": "xyz",
|
||||
"act": "https://localhost/act",
|
||||
"act": "https://localhost/act ",
|
||||
},
|
||||
annotations: models.Annotations{
|
||||
models.Annotation{
|
||||
@@ -78,7 +78,7 @@ var annotationMapsTestCases = []annotationMapsTestCase{
|
||||
},
|
||||
models.Annotation{
|
||||
Name: "act",
|
||||
Value: "https://localhost/act",
|
||||
Value: "https://localhost/act ",
|
||||
Visible: true,
|
||||
IsLink: true,
|
||||
IsAction: true,
|
||||
|
||||
Reference in New Issue
Block a user