mirror of
https://github.com/flynx/pWiki.git
synced 2026-01-10 12:01:07 +00:00
fixed an include bug...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7de02e470f
commit
4e00afe9b0
27
wiki.js
27
wiki.js
@ -460,6 +460,13 @@ var macro = {
|
|||||||
} else {
|
} else {
|
||||||
var name = e.nodeName.toLowerCase()
|
var name = e.nodeName.toLowerCase()
|
||||||
|
|
||||||
|
// parse attr values...
|
||||||
|
for(var i=0; i < e.attributes.length; i++){
|
||||||
|
var attr = e.attributes[i]
|
||||||
|
|
||||||
|
attr.value = _parseText(context, attr.value, macro)
|
||||||
|
}
|
||||||
|
|
||||||
// macro match -> call macro...
|
// macro match -> call macro...
|
||||||
if(name in macro){
|
if(name in macro){
|
||||||
$(e).replaceWith(macro[name]
|
$(e).replaceWith(macro[name]
|
||||||
@ -467,16 +474,8 @@ var macro = {
|
|||||||
function(elem, c){
|
function(elem, c){
|
||||||
return _parse(c || context, elem, macro) }))
|
return _parse(c || context, elem, macro) }))
|
||||||
|
|
||||||
// normal tag -> attrs + sub-tree...
|
// normal tag -> sub-tree...
|
||||||
} else {
|
} else {
|
||||||
// parse attr values...
|
|
||||||
for(var i=0; i < e.attributes.length; i++){
|
|
||||||
var attr = e.attributes[i]
|
|
||||||
|
|
||||||
attr.value = _parseText(context, attr.value, macro)
|
|
||||||
}
|
|
||||||
|
|
||||||
// parse sub-tree...
|
|
||||||
_parse(context, e, macro)
|
_parse(context, e, macro)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -795,6 +794,7 @@ var data = {
|
|||||||
text: ''
|
text: ''
|
||||||
+'<div>'
|
+'<div>'
|
||||||
+'<input type="checkbox" disabled/>'
|
+'<input type="checkbox" disabled/>'
|
||||||
|
// XXX select all on focus...
|
||||||
+'<span class="raw" contenteditable tabindex="0" '
|
+'<span class="raw" contenteditable tabindex="0" '
|
||||||
+'saveto="@source(../path)/@now()" style="display:inline-block">'
|
+'saveto="@source(../path)/@now()" style="display:inline-block">'
|
||||||
+'...'
|
+'...'
|
||||||
@ -804,10 +804,11 @@ var data = {
|
|||||||
+'<macro src="../*">'
|
+'<macro src="../*">'
|
||||||
+'<div class="todo-item">'
|
+'<div class="todo-item">'
|
||||||
+'<input type="checkbox"/>'
|
+'<input type="checkbox"/>'
|
||||||
+'<span class="raw" contenteditable tabindex="0" '
|
+'<include class="raw" '
|
||||||
+'saveto="@source(./path)" style="display:inline-block">'
|
+'contenteditable tabindex="0" '
|
||||||
+'@include(./raw)'
|
+'style="display:inline-block" '
|
||||||
+'</span> '
|
+'saveto="@source(./path)" '
|
||||||
|
+'src="./raw"/>'
|
||||||
+'<a class="button" href="#@source(./path)/delete">×</a>'
|
+'<a class="button" href="#@source(./path)/delete">×</a>'
|
||||||
+'</div>'
|
+'</div>'
|
||||||
+'</macro>'
|
+'</macro>'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user