amend global filters
							parent
							
								
									8e353c60b9
								
							
						
					
					
						commit
						2aabfc3c20
					
				|  | @ -74,16 +74,16 @@ module.exports = { | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		// this filter needs to be defined here, to access the URL
 | 		// make relative URLs absolute
 | ||||||
| 		data = data.replaceAll(/\[([^\]]*)\]\(\/([^\/][^\)]*)\)/g, | 		data = data.replaceAll(/\[([^\]]*)\]\(\/([^\/][^\)]*)\)/g, | ||||||
|  			(match, title, address) => { |  			(match, title, address) => { | ||||||
| 				return "["+title+"]("+base_address+"/"+address+")"; | 				return "["+title+"]("+base_address+"/"+address+")"; | ||||||
|   			} |   			} | ||||||
| 		); | 		); | ||||||
| 
 | 
 | ||||||
| 		// removes inline links and refs
 | 		// remove inline links and refs
 | ||||||
| 		if (!links) { | 		if (!links) { | ||||||
| 			data = data.replaceAll(/([^\!])\[\[?([^\]]+\]?)\]\([^\)]+\)/g, '$1$2'); | 			data = data.replaceAll(/\[\[?([^\]]+\]?)\]\([^\)]+\)/g, '$2'); | ||||||
| 			data = data.replaceAll(/[\\\[]+([0-9]+)[\\\]]+/g, '[$1]'); | 			data = data.replaceAll(/[\\\[]+([0-9]+)[\\\]]+/g, '[$1]'); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue