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

system.verbs.builtins.radio.string.processMacros

on processMacros (s) {
	<<Changes
		<<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;
		pt.tools = @radio.data.website.["#tools"];
		try {s = html.processmacros (s, adrpagetable:@pt)}};
	return (s)}
<<bundle //test code
	<<dialog.alert (processmacros ("aaa <%random (1, infinity)%> bbb <%clock.now ()%> ccc"))
	<<dialog.alert (processmacros ("<%clock.now ()%>"))
	<<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.