From bfc0a684f0ad3243160a9d65d62ced46c3b9576c Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sat, 19 Jan 2013 22:16:15 +0100 Subject: [PATCH] updated Markup.js to parse [span] in prepartion for titles and general better display of infoboxes yes, it's rather rudimentary.. yes, i should really dig into the new Markup-System... :/ --- template/js/Markup.js | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/template/js/Markup.js b/template/js/Markup.js index 869e5a2a..1435a11d 100644 --- a/template/js/Markup.js +++ b/template/js/Markup.js @@ -140,6 +140,20 @@ var Markup = { return (E || "") + "" } }); + D = D.replace(/(.)?\[span\s*[\s+=:]\s*(.+?)\]/gi, + function(F, E, H) { + if (E == "\\") { + return F.substr(1) + } else { + var G = Markup._yank(H, [["class", "\\S+"]]); + Markup.tags.push({ + name: "span", + close: false, + other: G + }); + return (E || "") + "" + } + }); B += "|pad|span"; A += "|color|span|icon"; case Markup.MODE_COMMENT: @@ -391,9 +405,6 @@ var Markup = { case "s": G += "" + Markup._htmlmize(B[D][1]) + ""; break; - case "span": - G += "" + Markup._htmlmize(B[D][1]) + ""; - break; case "pad": G += '
' + Markup._htmlmize(B[D][1]) + "
"; break; @@ -428,7 +439,14 @@ var Markup = { G += '" />' + Markup._htmlmize(B[D][1]) + '' } break; - case "img": + case "span": + var F = B[D][2]; + if (F.name != "" && Markup._isUrlSafe(F.name)) { + G += '' + G += Markup._htmlmize(B[D][1]) + '' + } + break; + case "img": var F = B[D][2]; if (F.src != "" && Markup._isUrlSafe(F.src)) { G += '