diff --git a/compile.js b/compile.js index 27bbc91..e2c5c57 100644 --- a/compile.js +++ b/compile.js @@ -63,11 +63,11 @@ function format(data, name) { "$1$2$3$4" ) .replace( /* multitag prefix fix for ( and [ */ - /([(\[])\n\t*(<(?:code|a href=".*")>.*<\/(?:code|a)>)/g, + /([(\[])\n\t*(<(?:code|a href=".+?")>.*<\/(?:code|a)>)/g, "$1$2" ) .replace( /* multitag suffix fix for special characters. */ - /(<\/(?:a|code)>)\n\t*([.)\];:,])/g, + /(<\/(?:a|code)>)\n\t*([.)\];:,?!+-])/g, "$1$2" ) .replace( /* fix tag attached to word and not whitespace */ @@ -83,6 +83,10 @@ function format(data, name) { function(match, inline) { return "
" + inline.replace(/\t/g, "") + "
";
}
+ )
+ .replace( /* fix monospace'd links */
+ /\n\t+(.*?)<\/code>\n\t+<\/a>/g,
+ "$2
"
);
}
// probably should bring in a better templating engine but whatever
diff --git a/package-lock.json b/package-lock.json
index 656541d..d5aa528 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "yiki",
- "version": "0.1.2",
+ "version": "0.1.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "yiki",
- "version": "0.1.2",
+ "version": "0.1.3",
"license": "MIT",
"dependencies": {
"@liquify/prettify": "^0.5.5-beta.1",
diff --git a/package.json b/package.json
index 93292b7..dce1f05 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "yiki",
- "version": "0.1.2",
+ "version": "0.1.3",
"description": "The yellows111 wiki system",
"main": "compile.js",
"scripts": {