fix build script
This commit is contained in:
1 parent
2677aa1e2e
commit
4eff8b9b33
1 file changed
+6
-6
@@ -72,12 +72,6 @@ function convert(content, file) {
|
||||
let title = match.match(/\[\[([^\]|#]*)/)[1]
|
||||
let anchor = null
|
||||
|
||||
// set title and href
|
||||
if (match.indexOf('|') > 0) {
|
||||
href = match.match(/\[\[([^\||#]*)/)[1]
|
||||
title = match.match(/\|(.*)\]\]/)[1]
|
||||
}
|
||||
|
||||
// set anchor
|
||||
if (match.indexOf('#') > 0) {
|
||||
anchor = match.match(/#([^\||\]]*)/)[1]
|
||||
@@ -89,6 +83,12 @@ function convert(content, file) {
|
||||
anchor = sanitizeName(anchor)
|
||||
}
|
||||
|
||||
// set title and href
|
||||
if (match.indexOf('|') > 0) {
|
||||
href = match.match(/\[\[([^\||#]*)/)[1]
|
||||
title = match.match(/\|(.*)\]\]/)[1]
|
||||
}
|
||||
|
||||
// sanitize href
|
||||
href = sanitizeName(href ? href : file.replace('\.md', ''))
|
||||
|
||||
|
||||
Reference in new issue
Block a user