* plain text stays as it is, with line wrapping * [name](url) is a link * ``` is multi-line code (ie. don't wrap lines) * `t for a textarea * `c for a div * `sc< and >`sc for javascript * js is the only one with a special closing tag (it can have > in it) * :r for colorForth red etc * all the colour stuff is for colorForth define("unlink(s)", "ulk") :(unst) ulk s "" arb . name "" = "[" name "](" link ")" :s(ulk) unlink = s :(return) unst define("unesc(s)", "ugt") :(tgst) ugt s "<" = "<" :s(ugt) ult s ">" = ">" :s(ult) unesc = unlink(s) :(return) tgst define("tag(file,iden,before,after)", "tag") :(cst) tag file iden "<" arb . match ">" = before match after :s(tag) tag = file :(return) cst define("colTag(file,colour)", "col") :(st) col colour len(1) . c file = tag(file, ":" c, "", "") colTag = file :(return) st output = "" output = "" output = "" output = " Garklein's stuff" output = " " output = "" output = "
" filename = input nl = "*~3|a." file = input in file = file nl input :s(in) file = file nl gt file "<" = "<" :s(gt) lt file ">" = ">" :s(lt) file = colTag(file, "red") file = colTag(file, "green") * hex green file = tag(file, ":hex", "", "") file = colTag(file, "blue") file = colTag(file, "yellow") file = colTag(file, "white") file = colTag(file, "cyan") file = colTag(file, "magenta") cf = colTag(":r<color>", "red") colTag(":g<Forth>", "green") cfr file ":<clrfrth>" = cf :s(cfr) file = tag(file, "`t", "") file = tag(file, "`d", "
") link file "[" break("[]") . name "](" break(")") . link ")" = "" name "" :s(link) code file "```" nl arb . c "```" = "
" nl unlink(c) "
"   :s(code)
scpt file "`sc<" nl arb . c ">`sc" = ""      :s(scpt)

     file = "
" nl file
     file = file "
" file pos(0) "
" nl "
" = "" file "
" nl "
" rpos(0) = "" file = file nl out file arb . output nl = :s(out) output = "
" filename break("/.") . file ".wm" = path = "/" file ".html" back = "" fld filename break("/") . folder "/" rpos(0) = :f(home) path = "/" folder "" path back = back "../" :(fld) home path = "~" path output = "

" path "
" output = "
" output = "" end