rewrite server module
This commit is contained in:
@@ -15,3 +15,17 @@ func markdownToHTML(mdText string) string {
|
||||
renderer := html.NewRenderer(opts)
|
||||
return string(markdown.Render(doc, renderer))
|
||||
}
|
||||
|
||||
func basePath(base string) string {
|
||||
if base == "" || base == "." {
|
||||
return "/"
|
||||
}
|
||||
return base
|
||||
}
|
||||
|
||||
func joinBase(base, name string) string {
|
||||
if base == "" {
|
||||
return "/" + name
|
||||
}
|
||||
return base + "/" + name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user