more cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-08-15 17:32:07 +03:00
parent 6befa05d33
commit 0891ae9a50
4 changed files with 32 additions and 6 deletions

View File

@ -281,7 +281,18 @@ object.Constructor('BasePage', {
//*/
resolve: relMatchProxy('resolve'),
delete: function(path='.'){
this.__delete__()
this.__delete__(path)
return this },
// XXX should these be implemented here or proxy to .store???
copy: async function(to){
this.get(to).data = await this.data
this.path = to
return this },
move: async function(to){
var from = this.path
await this.copy(to)
this.delete(from)
return this },
//
@ -1299,6 +1310,8 @@ module.System = {
// XXX tests...
//
_test_macro: {
text: '@source(./name) @source(./name)'},
test_page: function(){
console.log('--- RENDERER:', this.render_root)
console.log('--- PATH: ', this.path)

View File

@ -52,8 +52,8 @@ module.BaseParser = {
'"(?<PREFIXDoubleQuotedArg>[^"]*)"',
"'(?<PREFIXSingleQuotedArg>[^']*)'",
// arg
// NOTE: this is last because it could eat up parts of the above
// alternatives...
// NOTE: this is last because it could eat up parts of
// the above alternatives...
//'|\\s+[^\\s\\/>\'"]+',
'(?<PREFIXArg>[^\\sSTOP\'"]+)',
].join('|'),

View File

@ -65,7 +65,7 @@ pwiki.pwiki
text: object.doc`
some text with inline @source(./path) macros...
<div wikiwords=false>
<div wikiwords=no>
now @source(./path) inside a div...
</div>` })
.update({

View File

@ -2,9 +2,16 @@
*
*
*
* XXX BUG: pwiki2-test.js: /test/macros -- broken parser...
* XXX BUG: source/include problem...
* to reproduce:
* .get('/System/_text_macro/_text').text
* this does not exhibit the issue:
* .get('/System/_text_macro').text
* XXX BUG?: markdown: when parsing chunks each chunk gets an open/closed
* <p> inserted at start/end -- this breaks stuff returned by macros...
* ...there are two ways to dance around this:
* - make filters run a bit more globaly -- per block...
* - find a local parser...
* XXX OPTIMIZE: /_tree is really slow...
* XXX might be a good idea to add page caching (state.page_cache) relative
* to a path on parsing, to avoid re-matching the same page over and
@ -17,6 +24,7 @@
* },
* ...
* }
* XXX BUG: FF: conflict between object.run and PouchDB...
* XXX BUG: browser: .get('/*').raw hangs in the browser context...
* XXX BUG?: /_tree for some reason does not show anything on lower levels...
* ...renaming _tree -> all fixed the issue
@ -28,6 +36,7 @@
* - per page
* - global
* XXX Q: can we access fs from a pwa???
* ...looks like no :|
*
*
*
@ -46,10 +55,14 @@
* - zip (json/tree) --
* - page actions
* - delete -- DONE
* - move/rename --
* - copy/move --
* - migrate bootstrap --
* - store topology --
* - sync and sync conf --
* - images
* - get --
* - download --
* - upload --
* - markdown -- DONE
* - WikiWord -- DONE
* - dom filter mechanics -- DONE