Monday, November 08, 2010 at 12:05 AM.

on processMacros (s) {
		<<1/20/02; 8:48:15 AM by DW
			<<Created. A single place to call to handle macros for various Radio jobs. I didn't want this code to start cropping up all over the place. Better to bottleneck it.
	if s contains "<%" {
		local (pt);
		new (tabletype, @pt);
		pt.macroStartCharacters = "<%";
		pt.macroEndCharacters = "%>";
		pt.processMacrosInHtmlTags = true; =["#tools"];
		try {s = html.processmacros (s, adrpagetable:@pt)}};
	return (s)}
<<bundle //test code
	<<dialog.alert (processmacros ("aaa <%random (1, infinity)%> bbb < ()%> ccc"))
	<<dialog.alert (processmacros ("< ()%>"))
	<<dialog.alert (processmacros ("no macros here"))

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.