mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-12 06:24:10 +01:00
console: use PureJSON for documentation
This commit is contained in:
@@ -128,7 +128,7 @@ func (c *Component) docsHandlerFunc(gc *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
gc.Header("Cache-Control", "max-age=300")
|
gc.Header("Cache-Control", "max-age=300")
|
||||||
gc.IndentedJSON(http.StatusOK, gin.H{
|
gc.PureJSON(http.StatusOK, gin.H{
|
||||||
"markdown": buf.String(),
|
"markdown": buf.String(),
|
||||||
"toc": toc,
|
"toc": toc,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ func TestServeDocs(t *testing.T) {
|
|||||||
Path string
|
Path string
|
||||||
Expect string
|
Expect string
|
||||||
}{
|
}{
|
||||||
{"usage", `\u003ca href=\"configuration\"\u003econfiguration section\u003c/a\u003e`},
|
{"usage", `<a href=\"configuration\">configuration section</a>`},
|
||||||
{"intro", `data:image/svg`},
|
{"intro", `data:image/svg`},
|
||||||
}
|
}
|
||||||
for _, tc := range cases {
|
for _, tc := range cases {
|
||||||
|
|||||||
Reference in New Issue
Block a user