tweaks and notes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-09-22 03:56:45 +03:00
parent 3fb79baea2
commit fa91636be5
3 changed files with 19 additions and 5 deletions

View File

@ -1944,11 +1944,11 @@ module.System = {
text: `@include("../**/path:@(all)" join="@source(line-separator)")`},
info: {
text: object.doc`
Path: @source(../path)
Path: [@source(../path) ]
(<a href="#@source(../path)/edit">edit</a>)<br>
Resolved path: @source(../resolved)
Resolved path: [@source(../resolved)]
(<a href="#@source(../resolved)/edit">edit</a>)<br>
Referrer: @source(../referrer)
Referrer: [@source(../referrer)]
(<a href="#@source(../referrer)/edit">edit</a>)<br>
Args: <args/><br>

View File

@ -52,12 +52,16 @@ module = {
// XXX EXPERIMENTAL
encode: function(str){
return str
.replace(/[#:*%]/g, encodeURIComponent) },
.replace(/[#:*%'"]/g,
function(s){
return '%'+s.charCodeAt().toString(16) }) },
decode: function(str){
return decodeURIComponent(str) },
encodeElem: function(str){
return str
.replace(/[#:*%\\\/.]/g, encodeURIComponent) },
.replace(/[#:*%'"\\\/]/g,
function(s){
return '%'+s.charCodeAt().toString(16) }) },
decodeElem: function(str){
return decodeURIComponent(str) },

View File

@ -6,6 +6,16 @@
* - fs store/export in browser or a simple way to export/import...
*
*
* XXX titles containing quotes break things...
* XXX BUG: for some reason deleting and refreshing takes ~2x as long as
* refreshing...
* to reproduce:
* pwiki.path = '/tree' // reports about ~2sec
* await pwiki.get('/Test/Subtree/Page2/delete').raw // refresh reports ~4sec (XXX)
* while:
* pwiki.path = '/tree' // reports about ~2sec
* await pwiki.get('/Test/Subtree/Page2').delete() // fast
* pwiki.path = '/tree' // reports about ~2sec
* XXX macros: should we add the pattern path to .depends instead of the
* final path...
* ...would also need a fast way to pattern match...