mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-22 02:51:38 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fd82fc26a6
commit
7a86d47230
@ -1673,6 +1673,7 @@ object.Constructor('Page', BasePage, {
|
|||||||
'!': true,
|
'!': true,
|
||||||
// XXX EXPERIMENTAL...
|
// XXX EXPERIMENTAL...
|
||||||
quote: true,
|
quote: true,
|
||||||
|
'quote!': true,
|
||||||
},
|
},
|
||||||
|
|
||||||
// XXX should this be .raw or .parse()???
|
// XXX should this be .raw or .parse()???
|
||||||
@ -1684,12 +1685,16 @@ object.Constructor('Page', BasePage, {
|
|||||||
// XXX this is html/web specific, should it be here???
|
// XXX this is html/web specific, should it be here???
|
||||||
// ...
|
// ...
|
||||||
// XXX should this be .raw or .parse()???
|
// XXX should this be .raw or .parse()???
|
||||||
quote: function(){
|
quote: async function(energetic=false){
|
||||||
return this.get('..:$ARGS').raw//parse()
|
return this.get('..:$ARGS', {energetic: await this.energetic}).raw//parse()
|
||||||
.then(function(res){
|
.then(function(res){
|
||||||
return res instanceof Array ?
|
return res instanceof Array ?
|
||||||
res.map(pwpath.quoteHTML)
|
res.map(pwpath.quoteHTML)
|
||||||
: pwpath.quoteHTML(res) }) },
|
: pwpath.quoteHTML(res) }) },
|
||||||
|
'quote!': Object.assign(
|
||||||
|
function(){
|
||||||
|
return this.quote(true) },
|
||||||
|
{energetic: true}),
|
||||||
|
|
||||||
|
|
||||||
// events...
|
// events...
|
||||||
@ -2182,7 +2187,7 @@ module.System = {
|
|||||||
<a href="#/list">☰</a>
|
<a href="#/list">☰</a>
|
||||||
<a href="#<slot parent>../</slot>">⇑</a>
|
<a href="#<slot parent>../</slot>">⇑</a>
|
||||||
<!-- XXX make this editable... -->
|
<!-- XXX make this editable... -->
|
||||||
[<slot location>@source(./location/!/quote)</slot>]
|
[<slot location>@source(./location/quote/!)</slot>]
|
||||||
<a href="javascript:refresh()">⟳</a>
|
<a href="javascript:refresh()">⟳</a>
|
||||||
<slot edit>
|
<slot edit>
|
||||||
<a href="#@source(s ./path/!)/edit">✎</a>
|
<a href="#@source(s ./path/!)/edit">✎</a>
|
||||||
@ -2196,7 +2201,7 @@ module.System = {
|
|||||||
<!-- NOTE: this is not included directly to enable client code to
|
<!-- NOTE: this is not included directly to enable client code to
|
||||||
set slots that are defined after the content... -->
|
set slots that are defined after the content... -->
|
||||||
<slot content>
|
<slot content>
|
||||||
<h1><slot title>@source(./title/!/quote)</slot></h1>
|
<h1><slot title>@source(./title/quote/!)</slot></h1>
|
||||||
@include(.:$ARGS join="@source(file-separator)" recursive="")
|
@include(.:$ARGS join="@source(file-separator)" recursive="")
|
||||||
</slot>
|
</slot>
|
||||||
` },
|
` },
|
||||||
@ -2228,7 +2233,7 @@ module.System = {
|
|||||||
/*/
|
/*/
|
||||||
_edit: {
|
_edit: {
|
||||||
text:
|
text:
|
||||||
'@source(./path/!/quote)'
|
'@source(./path/quote/!)'
|
||||||
+'<hr>'
|
+'<hr>'
|
||||||
+'<macro src="." join="@source(file-separator)">'
|
+'<macro src="." join="@source(file-separator)">'
|
||||||
+'<h1 '
|
+'<h1 '
|
||||||
@ -2274,7 +2279,7 @@ module.System = {
|
|||||||
<title>@source(../title) (edit)</title>
|
<title>@source(../title) (edit)</title>
|
||||||
</slot>
|
</slot>
|
||||||
<slot parent>../..</slot>
|
<slot parent>../..</slot>
|
||||||
<slot location>@source(../location/!/quote)</slot>
|
<slot location>@source(../location/quote/!)</slot>
|
||||||
<slot edit/>
|
<slot edit/>
|
||||||
<slot content>
|
<slot content>
|
||||||
<macro editor src=".."/>
|
<macro editor src=".."/>
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
* XXX BUG: for some reason editing the root page ('/') hangs /tree...
|
||||||
* XXX .parse(..): should we handle pattern paths and lists of text???
|
* XXX .parse(..): should we handle pattern paths and lists of text???
|
||||||
* XXX parser: error handling: add line number + context... (???)
|
* XXX parser: error handling: add line number + context... (???)
|
||||||
* XXX BUG: parser:
|
* XXX BUG: parser:
|
||||||
@ -438,6 +439,8 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* XXX DOC:
|
* XXX DOC:
|
||||||
|
* - .../quote/! is not the same as .../!/quote
|
||||||
|
* this is because actions are called right to left...
|
||||||
* - macro isolation in relation to slots...
|
* - macro isolation in relation to slots...
|
||||||
* - paths in pWiki behave a bit differently than traditional
|
* - paths in pWiki behave a bit differently than traditional
|
||||||
* file-system paths, this is due to one key distinction:
|
* file-system paths, this is due to one key distinction:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user