Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #28 from vincenthuang75025/master
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 authored Aug 28, 2022
2 parents afb663e + a340a67 commit 34bb5aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ func processTarget(source string) string {
if strings.HasPrefix(source, "/") {
return strings.TrimSuffix(source, ".md")
}
res := "/" + strings.TrimSuffix(strings.TrimSuffix(source, ".html"), ".md")
res := strings.Split(source, "#")[0]
res = "/" + strings.TrimSuffix(strings.TrimSuffix(res, ".html"), ".md")
res, _ = url.PathUnescape(res)
res = strings.Split(res, "#")[0]
res = strings.TrimSpace(res)
res = UnicodeSanitize(res)
return strings.ReplaceAll(url.PathEscape(res), "%2F", "/")
Expand Down

0 comments on commit 34bb5aa

Please sign in to comment.