diff --git a/index.html b/index.html
index 45e10a4..0af638f 100755
--- a/index.html
+++ b/index.html
@@ -111,7 +111,7 @@ var reload = () => {
})
}
- $('.text').html(activateWikiWords(text, filters.indexOf('show_link_brackets') < 0 && editing))
+ $('.text').html(setWikiWords(text, filters.indexOf('show_link_brackets') < 0 && editing))
// XXX save...
localStorage['wiki-data'] = JSON.stringify(Wiki.__wiki_data)
@@ -131,32 +131,6 @@ var go = (path) => {
reload()
}
-var clearWikiWords = elem => {
- // clear existing...
- elem.find('.WikiWord').each(function(){
- $(this).attr('braced') == 'yes' ?
- $(this).replaceWith(['['].concat(this.childNodes, [']']))
- : $(this).replaceWith(this.childNodes)
- })
- return elem
-}
-
-var activateWikiWords = (text, show_brackets) =>
- text
- // set new...
- .replace(
- Wiki.__wiki_link__,
- function(l){
- return ''
- + (show_brackets && l[0] == '[' ? l.slice(1, -1) : l)
- +''
- })
-
-
$(() => {
$(window).on('popstate', function(evt){
event.state
diff --git a/wiki.js b/wiki.js
index 7ab9daf..478db82 100755
--- a/wiki.js
+++ b/wiki.js
@@ -6,6 +6,32 @@
//var DEBUG = DEBUG != null ? DEBUG : true
+var clearWikiWords = elem => {
+ // clear existing...
+ elem.find('.WikiWord').each(function(){
+ $(this).attr('braced') == 'yes' ?
+ $(this).replaceWith(['['].concat(this.childNodes, [']']))
+ : $(this).replaceWith(this.childNodes)
+ })
+ return elem
+}
+
+var setWikiWords = (text, show_brackets) =>
+ text
+ // set new...
+ .replace(
+ Wiki.__wiki_link__,
+ function(l){
+ return ''
+ + (show_brackets && l[0] == '[' ? l.slice(1, -1) : l)
+ +''
+ })
+
+
/*********************************************************************/
@@ -498,11 +524,27 @@ var Wiki = {
var macro = {
- // XXX this misses nested tags (i.e. pattern within a tag) within
- // one line for some reason....
+
+ // Abstract macro syntax:
+ // Inline macro:
+ // @macro(arg ..)
+ //
+ // HTML-like:
+ //