some improvements
This commit is contained in:
parent
8143e484cd
commit
d9d089be0d
8 changed files with 132 additions and 24 deletions
|
|
@ -13,6 +13,8 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
const delim = "+"
|
||||
|
||||
var filter = makeFilter()
|
||||
|
||||
func makeFilter() analysis.CharFilter {
|
||||
|
|
@ -40,7 +42,11 @@ func Render(p *core.Page) string {
|
|||
}
|
||||
|
||||
func Title(title string) string {
|
||||
return whiteSpace.ReplaceAllString(titleRe.ReplaceAllString(title, ""), "+")
|
||||
return whiteSpace.ReplaceAllString(titleRe.ReplaceAllString(title, ""), delim)
|
||||
}
|
||||
|
||||
func Untitle(title string) string {
|
||||
return strings.ReplaceAll(title, delim, " ")
|
||||
}
|
||||
|
||||
func StoreTitle(section, title string) string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue