diff --git a/compile.js b/compile.js index e2c5c57..2c60e88 100644 --- a/compile.js +++ b/compile.js @@ -59,11 +59,11 @@ function format(data, name) { .split("\n") /* split by every newline */ .join("\n\t\t\t") /* then add padding and convert back into string */ .replace( /* multitag text node fix (should really just encase all text with , but whatever) */ - /(\t*)(<(?:code|a href=".*")>)\n\t*(.*)\n\t*(<\/(?:code|a)>)/g, + /(\t*)(<(?:code|a href=".+?")>)\n\t*(.*?)\n\t*(<\/(?:code|a)>)/g, "$1$2$3$4" ) - .replace( /* multitag prefix fix for ( and [ */ - /([(\[])\n\t*(<(?:code|a href=".+?")>.*<\/(?:code|a)>)/g, + .replace( /* multitag prefix fix for (, [ and - */ + /([(\[\-])\n\t*(<(?:code|a href=".+?")>.*<\/(?:code|a)>)/g, "$1$2" ) .replace( /* multitag suffix fix for special characters. */ @@ -75,7 +75,7 @@ function format(data, name) { "$1 $2" ) .replace( /* replace .md links to html ones */ - /href="(.+)\.md"/g, + /href="(.+?)\.md"/g, "href=\"$1.html\"" ) .replace( /* evil codeblock fix */ diff --git a/package-lock.json b/package-lock.json index d5aa528..2aa7c2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yiki", - "version": "0.1.3", + "version": "0.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yiki", - "version": "0.1.3", + "version": "0.1.4", "license": "MIT", "dependencies": { "@liquify/prettify": "^0.5.5-beta.1", diff --git a/package.json b/package.json index dce1f05..3c14b8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yiki", - "version": "0.1.3", + "version": "0.1.4", "description": "The yellows111 wiki system", "main": "compile.js", "scripts": { diff --git a/ymake.js b/ymake.js index ccdaf9a..047d99b 100644 --- a/ymake.js +++ b/ymake.js @@ -73,7 +73,7 @@ Filesystem.globSync(`${SRC_DIRS}/**/*.css`).forEach(function(file) { Filesystem.writeFileSync(Path.normalize(BUILD_DIR+"/sitemap.xml"), require("./sitemap-gen.js")( MARKDOWN_L.map(function(filename){ - return Path.dirname(filename).replace(/\\/g, "/").replace(/\.md/g, ".html") + return Path.dirname(filename).replace(/\\/g, "/") + "/" + Path.basename(filename); }), Path.normalize(SRC_DIRS) )