mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-30 18:40:08 +00:00 
			
		
		
		
	...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									244266b2f6
								
							
						
					
					
						commit
						51be8b9dff
					
				
							
								
								
									
										40
									
								
								pwiki2.js
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								pwiki2.js
									
									
									
									
									
								
							| @ -12,6 +12,7 @@ | |||||||
| /*********************************************************************/ | /*********************************************************************/ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | // XXX might be a good idea to make this compatible with node's path API...
 | ||||||
| var pWikiPath =  | var pWikiPath =  | ||||||
| module.pWikiPath = { | module.pWikiPath = { | ||||||
| 
 | 
 | ||||||
| @ -110,9 +111,11 @@ module.pWikiPath = { | |||||||
| 
 | 
 | ||||||
| //---------------------------------------------------------------------
 | //---------------------------------------------------------------------
 | ||||||
| 
 | 
 | ||||||
| // XXX should we support page symlinking???
 | // NOTE: store keys must be normalized...
 | ||||||
| // XXX store keys must be normalized...
 | //
 | ||||||
| // XXX must support store stacks...
 | // XXX must support store stacks...
 | ||||||
|  | // XXX path macros???
 | ||||||
|  | // XXX should we support page symlinking???
 | ||||||
| var store =  | var store =  | ||||||
| module.store = { | module.store = { | ||||||
| 	exists: function(path){ | 	exists: function(path){ | ||||||
| @ -230,7 +233,40 @@ module.page = { | |||||||
| 
 | 
 | ||||||
| //---------------------------------------------------------------------
 | //---------------------------------------------------------------------
 | ||||||
| 
 | 
 | ||||||
|  | // Abstract macro syntax:
 | ||||||
|  | // 	Inline macro:
 | ||||||
|  | // 		@macro(arg ..)
 | ||||||
|  | //
 | ||||||
|  | // 	HTML-like:
 | ||||||
|  | // 		<macro arg=value ../>
 | ||||||
|  | //
 | ||||||
|  | // 	HTML-like with body:
 | ||||||
|  | // 		<macro arg=value ..>
 | ||||||
|  | // 			..text..
 | ||||||
|  | // 		</macro>
 | ||||||
|  | //
 | ||||||
|  | // XXX should inline macros support named args???
 | ||||||
|  | var MACRO_PATTERN = | ||||||
|  | 	[[ | ||||||
|  | 		// @macro(arg ..)
 | ||||||
|  | 		'\\\\?@([a-zA-Z-_]+)\\(([^)]*)\\)', | ||||||
|  | 
 | ||||||
|  | 		// <macro ..> | <macro ../>
 | ||||||
|  | 		'<\\s*($MACROS)(\\s+[^>]*)?/?>', | ||||||
|  | 		// </macro>
 | ||||||
|  | 		'</\\s*($MACROS)\\s*>', | ||||||
|  | 	].join('|'), 'mg'], | ||||||
|  | 
 | ||||||
|  | var WIKIWORD_PATTERN = | ||||||
|  | 	RegExp('('+[ | ||||||
|  | 		//'\\\\?(\\/|\\./|\\.\\./|>>|[A-Z][_a-z0-9]+[A-Z/])[_a-zA-Z0-9/]*',
 | ||||||
|  | 		'\\\\?\\/?(\\./|\\.\\./|>>|[A-Z][_a-z0-9]+[A-Z/])[_a-zA-Z0-9/]*', | ||||||
|  | 		'\\\\?\\[[^\\]]+\\]', | ||||||
|  | 	].join('|') +')', 'g'), | ||||||
|  | 
 | ||||||
| var macros = { | var macros = { | ||||||
|  | 	now: function(){}, | ||||||
|  | 	macro: function(){}, | ||||||
| } | } | ||||||
| var expandPage = function(page){ | var expandPage = function(page){ | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user