diff --git a/index.html b/index.html index 413d327..61ae78a 100755 --- a/index.html +++ b/index.html @@ -80,6 +80,7 @@ var update_editor = function(){ .blur(() => { reload() }) + .text($('.raw').html()) } var go = (path) => { diff --git a/wiki.js b/wiki.js index 3e7d907..8d28f07 100755 --- a/wiki.js +++ b/wiki.js @@ -222,7 +222,8 @@ var macro = { .replace(/\s*\/\/.*$|\s*\/\*(.|[\n\r])*?\*\/\s*/mg, '')) }, // XXX - //nl2br: function(context, text){ return $('
').html(text.replace(/\n/g, '
\n')) }, + nl2br: function(context, elem){ + return $('
').html($(elem).html().replace(/\n/g, '
\n')) }, wikiword: function(context, elem){ return $('') @@ -532,10 +533,8 @@ var data = { +'

@include(../title)

\n' +'
\n' +'
@source(../raw)
\n' - // XXX avoid this... - +'\n' + +'
\n' + +'home\n' +'', }, }