mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-31 02:50:08 +00:00 
			
		
		
		
	refactoring patrerns...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									d452b63465
								
							
						
					
					
						commit
						0c1f48ee22
					
				
							
								
								
									
										11
									
								
								pwiki2.js
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								pwiki2.js
									
									
									
									
									
								
							| @ -492,13 +492,14 @@ object.Constructor('BasePage', { | ||||
| // XXX BUG? '<slot name=x text="moo <now/> foo">' is parsed semi-wrong...
 | ||||
| var parser = | ||||
| module.parser = { | ||||
| 	// XXX
 | ||||
| 	// XXX update a-la MACRO_ARGS...
 | ||||
| 	MACRO_INLINE_ARGS: '[^)]*', | ||||
| 	// XXX ugly...
 | ||||
| 	// XXX need to update the arg pattern below too...
 | ||||
| 	MACRO_ARGS: ['(', | ||||
| 			// "arg" | 'arg'
 | ||||
| 		'\\s+"[^"]"', | ||||
| 		'|\\s+\'[^\']\'', | ||||
| 			// XXX add quote escaping??
 | ||||
| 			'\\s+"[^"]*"', | ||||
| 			"|\\s+'[^']*'", | ||||
| 			// arg
 | ||||
| 			'|\\s+[^\\s\\/>\'"]+', | ||||
| 			// arg='val' | arg="val" | arg=val
 | ||||
| @ -531,7 +532,7 @@ module.parser = { | ||||
| 							.replace(/MACRO_ARGS/g, this.MACRO_ARGS) | ||||
| 							.replace(/MACRO_INLINE_ARGS/g, this.MACRO_INLINE_ARGS) | ||||
| 					})`)).length-2) },
 | ||||
| 	// XXX still buggy...
 | ||||
| 	// XXX update using MACRO_ARGS...
 | ||||
| 	MACRO_ARGS_PATTERN: RegExp('('+[ | ||||
| 			// named args...
 | ||||
| 			'(?<nameQuoted>[a-zA-Z-_]+)\\s*=([\'"])(?<valueQuoted>([^\\3]|\\\\3)*)\\3\\s*', | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user