Fix replacing relative links, fix #43

This commit is contained in:
Egor Kovetskiy
2020-12-04 00:28:52 +03:00
parent f6e542c6c2
commit d4008a5b72
3 changed files with 174 additions and 82 deletions

View File

@@ -213,11 +213,12 @@ func main() {
}
}
links, err := mark.ResolveRelativeLinks(api, markdown, ".")
links, err := mark.ResolveRelativeLinks(api, meta, markdown, ".")
if err != nil {
log.Fatalf(err, "unable to resolve relative links")
}
markdown = mark.ReplaceRelativeLinks(markdown, links)
markdown = mark.SubstituteLinks(markdown, links)
if dryRun {
compileOnly = true