[0.1.4] sitemap fix, more syntax changes

* fixed some patterns not having lazy modifiers
* realize ALL this time in ymake that the sitemap generator was hosed, that's fixed
This commit is contained in:
yellows111 2024-10-13 14:53:18 +01:00
parent 8736d49e52
commit 6565b78ac1
Signed by: yellows111
SSH Key Fingerprint: SHA256:ynw5IJBU1pb7fZfHgLihKu9gHHA8FVpixZbB6IEB3r8
4 changed files with 8 additions and 8 deletions

View File

@ -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 <span>, 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 */

4
package-lock.json generated
View File

@ -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",

View File

@ -1,6 +1,6 @@
{
"name": "yiki",
"version": "0.1.3",
"version": "0.1.4",
"description": "The yellows111 wiki system",
"main": "compile.js",
"scripts": {

View File

@ -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)
)