lint links
This commit is contained in:
parent
e4d69c409a
commit
d397e66e03
5 changed files with 26 additions and 6 deletions
|
|
@ -37,7 +37,9 @@ function generate(pathname) {
|
|||
var modified = guides.match(link) ? guides.replace(link, replace) : methods.replace(link, replace)
|
||||
return title + modified + "\n\n"
|
||||
})
|
||||
.replace(/\.md/gim, ".html") // fix links
|
||||
.replace(/(\[[^\]]+)(\.md)/gim, function(match, path, extension) {
|
||||
return path + (path.match(/http/) ? extension : ".html")
|
||||
}) // fix links
|
||||
var html = layout
|
||||
.replace(/\[version\]/, version) // update version
|
||||
.replace(/\[body\]/, marked(fixed))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue