0.1.1: Another Minor Formatting Update

* monospace now gets same treatment as urls when prefixed with ( or ['s
* Added terminating newline to files that were modified in 0.1.0,
  since i forgot last time
This commit is contained in:
yellows111 2024-05-13 11:40:42 +01:00
parent 95d0a3a106
commit f51418b79d
5 changed files with 10 additions and 9 deletions

View File

@ -62,14 +62,15 @@ function format(data, name) {
/(\t*)(<(?:code|a href=".*")>)\n\t*(.*)\n\t*(<\/(?:code|a)>)/g,
"$1$2$3$4"
)
.replace( /* link prefix spacing fix for ( and [ */
/([(\[])\n\t*(<a href=".*">.*<\/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. */
/(<\/(?:a|code)>)\n\t*([.)\];:,])/g,
"$1$2"
).replace( /* fix tag attached to word and not whitespace */
)
.replace( /* fix tag attached to word and not whitespace */
/(\w+)(<[a-zA-Z]\w*>)/g,
"$1 $2"
);
@ -110,4 +111,4 @@ module.exports = {"markup": markup, "format": format};
if(require.main === module) {
let content = markup(Filesystem.readFileSync(Process.argv[2]).toString());
Filesystem.writeFileSync(Process.argv[3], format(content, Path.basename(Process.argv[3], ".html").replace(/_/g, " ")));
}
}

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "yiki",
"version": "0.1.0",
"version": "0.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "yiki",
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",
"dependencies": {
"@liquify/prettify": "^0.5.5-beta.1",

View File

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

View File

@ -68,4 +68,4 @@ module.exports = function(fileList, filter) {
makeSitemapChunk(file, filter);
}
return renderSiteMap();
}
}

View File

@ -78,4 +78,4 @@ Filesystem.writeFileSync(Path.normalize(BUILD_DIR+"/sitemap.xml"),
Path.normalize(SRC_DIRS)
)
);
console.log(`SMAP: ${Path.normalize(BUILD_DIR+"/sitemap.xml")}`);
console.log(`SMAP: ${Path.normalize(BUILD_DIR+"/sitemap.xml")}`);