mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-30 18:40:08 +00:00 
			
		
		
		
	notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									6f4e2caa7a
								
							
						
					
					
						commit
						c2eddd9d9d
					
				| @ -24,6 +24,7 @@ var markdown = require('./filters/markdown') | |||||||
| var relProxy =  | var relProxy =  | ||||||
| function(name){ | function(name){ | ||||||
| 	var func = function(path='.:$ARGS', ...args){ | 	var func = function(path='.:$ARGS', ...args){ | ||||||
|  | 		path = this.resolvePathVars(path) | ||||||
| 		return this.store[name]( | 		return this.store[name]( | ||||||
| 			pwpath.relative(this.path, path),  | 			pwpath.relative(this.path, path),  | ||||||
| 			...args) }  | 			...args) }  | ||||||
| @ -35,6 +36,7 @@ function(name){ | |||||||
| 		if(path === true || path === false){ | 		if(path === true || path === false){ | ||||||
| 			strict = path | 			strict = path | ||||||
| 			path = '.:$ARGS' } | 			path = '.:$ARGS' } | ||||||
|  | 		path = this.resolvePathVars(path) | ||||||
| 		return this.store[name]( | 		return this.store[name]( | ||||||
| 			pwpath.relative(this.path, path),  | 			pwpath.relative(this.path, path),  | ||||||
| 			strict) }  | 			strict) }  | ||||||
| @ -755,9 +757,7 @@ object.Constructor('Page', BasePage, { | |||||||
| 			['name', 'default', ['local']], | 			['name', 'default', ['local']], | ||||||
| 			function(args){ | 			function(args){ | ||||||
| 				return this.macros.arg.call(this, args) }), | 				return this.macros.arg.call(this, args) }), | ||||||
| 		// XXX do we need this???
 |  | ||||||
| 		args: function(){ | 		args: function(){ | ||||||
| 			console.log('!!!!') |  | ||||||
| 			return pwpath.obj2args(this.args) }, | 			return pwpath.obj2args(this.args) }, | ||||||
| 		//
 | 		//
 | ||||||
| 		// 	@filter(<filter-spec>)
 | 		// 	@filter(<filter-spec>)
 | ||||||
| @ -1859,6 +1859,7 @@ module.System = { | |||||||
| 				(<a href="#@source(../resolved)/edit">edit</a>)<br> | 				(<a href="#@source(../resolved)/edit">edit</a>)<br> | ||||||
| 			Referrer: @source(../referrer) | 			Referrer: @source(../referrer) | ||||||
| 				(<a href="#@source(../referrer)/edit">edit</a>)<br> | 				(<a href="#@source(../referrer)/edit">edit</a>)<br> | ||||||
|  | 			Args: <args/><br> | ||||||
| 
 | 
 | ||||||
| 			type: @source(../type)<br> | 			type: @source(../type)<br> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -83,7 +83,7 @@ module.BaseParser = { | |||||||
| 			// @(arg ..)
 | 			// @(arg ..)
 | ||||||
| 			'\\\\?@\\((?<argsUnnamed>UNNAMED_ARGS)\\)', | 			'\\\\?@\\((?<argsUnnamed>UNNAMED_ARGS)\\)', | ||||||
| 			// <macro ..> | <macro ../>
 | 			// <macro ..> | <macro ../>
 | ||||||
| 			'<\\s*(?<nameOpen>MACROS)(?<argsOpen>ARGS)?\\s*/?>', | 			'<\\s*(?<nameOpen>MACROS)(?<argsOpen>\\sARGS)?\\s*/?>', | ||||||
| 			// </macro>
 | 			// </macro>
 | ||||||
| 			'</\\s*(?<nameClose>MACROS)\\s*>', | 			'</\\s*(?<nameClose>MACROS)\\s*>', | ||||||
| 		].join('|'))+')', | 		].join('|'))+')', | ||||||
|  | |||||||
							
								
								
									
										51
									
								
								pwiki2.js
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								pwiki2.js
									
									
									
									
									
								
							| @ -1,55 +1,28 @@ | |||||||
| /********************************************************************** | /********************************************************************** | ||||||
| *  | *  | ||||||
| * | * | ||||||
| * XXX BUG: this does not call the args macro... | * XXX BUG?: the action is called twice here: | ||||||
| * 			await pwiki.get('/path/testDirect:x:y:z').parse('<args/>') | * 			await pwiki.get('/path/testDirect:x:y:z').parse('@include(.:$ARGS)')  | ||||||
| * 		...syntax checking is done correctly though... | * 		and: | ||||||
| * XXX ARGS: arg passing is a mess... | * 			await pwiki.get('/path/testDirect:x:y:z').text | ||||||
| * 		- need a consistent way to access args | * XXX ARGS: should the arg locations in these be the same??? | ||||||
| * 			- global |  | ||||||
| * 				.root.args? |  | ||||||
| * 			- render root |  | ||||||
| * 			- local |  | ||||||
| * 		use: |  | ||||||
| * 			testDirect		- direct action |  | ||||||
| * 			testDirect!		- energetic direct action |  | ||||||
| * 			testPage		- page |  | ||||||
| * 			testAction		- page action |  | ||||||
| * 			testAction!		- energetic page action |  | ||||||
| * 		examples: |  | ||||||
| * 			// NOTE: .text is redered via _view and thus is on a different
 |  | ||||||
| *			//		level to .raw...
 |  | ||||||
| * 			// XXX should renderer.args be the same in .text and .parse(..)???
 |  | ||||||
| *			// XXX for .text and .parse(..), the action is called twice...
 |  | ||||||
| * 			// root path: /System/testAction:a:b:c
 | * 			// root path: /System/testAction:a:b:c
 | ||||||
| * 			await pwiki.get('/path/testDirect:x:y:z').raw | * 			await pwiki.get('/path/testDirect:x:y:z').raw | ||||||
| * 				.args			- x y z | * 				.args			- x y z | ||||||
| * 				.renderer.args	- a b c | * 				.renderer.args	- a b c (XXX seems logical) | ||||||
| * 				.root.args		- a b c |  | ||||||
| * 			await pwiki.get('/path/testAction:x:y:z').raw |  | ||||||
| * 				.args			- x y z  |  | ||||||
| * 				.renderer.args	- a b c |  | ||||||
| * 				.root.args		- a b c | * 				.root.args		- a b c | ||||||
| * 			await pwiki.get('/path/testDirect:x:y:z').parse('@include(.:$ARGS)')  | * 			await pwiki.get('/path/testDirect:x:y:z').parse('@include(.:$ARGS)')  | ||||||
| * 				.args			- x y z | * 				.args			- x y z | ||||||
| * 				.renderer.args	- a b c | * 				.renderer.args	- a b c (XXX odd) | ||||||
| * 				.root.args		- a b c | * 				.root.args		- a b c | ||||||
| * 				XXX triggered twice... |  | ||||||
| * 			await pwiki.get('/path/testAction:x:y:z').parse('@include(.:$ARGS)')  |  | ||||||
| * 				.args			- x y z |  | ||||||
| * 				.renderer.args	- a b c |  | ||||||
| * 				.root.args		- a b c |  | ||||||
| * 				XXX triggered twice... |  | ||||||
| * 			await pwiki.get('/path/testDirect:x:y:z').text | * 			await pwiki.get('/path/testDirect:x:y:z').text | ||||||
| * 				.args			- x y z | * 				.args			- x y z | ||||||
| * 				.renderer.args	- x y z | * 				.renderer.args	- x y z (XXX logical) | ||||||
| * 				.root.args		- a b c | * 				.root.args		- a b c | ||||||
| * 				XXX triggered twice... | * 		...this essentially boils down to how .renderer is handled... | ||||||
| * 			await pwiki.get('/path/testAction:x:y:z').text  | * 		currently it is inherited and since all pages are clones of the  | ||||||
| * 				.args			- x y z | * 		root page and the root is rendered it is always the .renderer  | ||||||
| * 				.renderer.args	- x y z | * 		unless we explicitly reassign it (.text) | ||||||
| * 				.root.args		- a b c |  | ||||||
| * 				XXX triggered twice... |  | ||||||
| * XXX CACHE need to explicitly prevent caching of some actions/pages... | * XXX CACHE need to explicitly prevent caching of some actions/pages... | ||||||
| * XXX FEATURE tags and accompanying API... | * XXX FEATURE tags and accompanying API... | ||||||
| * 		- add tags to page -- macro/filter | * 		- add tags to page -- macro/filter | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user