mirror of
				https://github.com/kovetskiy/mark.git
				synced 2025-10-31 03:37:35 +08:00 
			
		
		
		
	allow templates and macros to include blanks in path (#191)
This commit is contained in:
		
							parent
							
								
									5428cc6833
								
							
						
					
					
						commit
						3c7bd6133f
					
				| @ -18,7 +18,7 @@ import ( | ||||
| // <!-- Include: <template path> | ||||
| //      <optional yaml data> --> | ||||
| var reIncludeDirective = regexp.MustCompile( | ||||
| 	`(?s)<!--\s*Include:\s*(?P<template>\S+)\s*(\n(?P<config>.*?))?-->`) | ||||
| 	`(?s)<!--\s*Include:\s*(?P<template>.+?)\s*(\n(?P<config>.*?))?-->`) | ||||
| 
 | ||||
| func LoadTemplate( | ||||
| 	base string, | ||||
|  | ||||
| @ -21,7 +21,7 @@ var reMacroDirective = regexp.MustCompile( | ||||
| 
 | ||||
| 	`(?s)` + // dot capture newlines | ||||
| 		/**/ `<!--\s*Macro:\s*(?P<expr>[^\n]+)\n` + | ||||
| 		/*    */ `\s*Template:\s*(?P<template>\S+)\s*` + | ||||
| 		/*    */ `\s*Template:\s*(?P<template>.+?)\s*` + | ||||
| 		/*   */ `(?P<config>\n.*?)?-->`, | ||||
| ) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Stephan Hradek
						Stephan Hradek