dist/axis3d.js
//replace defined variables from a string
replace defined variables from a string
replace defined variables from a string
function processDefinition(str, name, value) {
		var arr = [];
		str = escape(str, arr);
		str = str.replace(new RegExp('([^#A-Za-z0-9_$]|^)' + name + '\\s*##\\s*([A-Za-z0-9_$]*)', 'g'), function (match, pre, post) {
			return pre + value + post;
		});
		str = str.replace(new RegExp('([A-Za-z0-9_$]*)\\s*##\\s*' + name + '([^A-Za-z0-9_$]|$)', 'g'), function (match, pre, post) {
			return pre + value + post;
		});
		str = str.replace(new RegExp('([^#A-Za-z0-9_$]|^)' + name + '([^A-Za-z0-9_$]|$)', 'g'), function (match, pre, post) {
			if (macros[value] != null && !(macros[value] instanceof Function)) value = macros[value];
			return pre + value + post;
		});
		str = str.replace(new RegExp('#' + name + '([^A-Za-z0-9_$]|$)', 'g'), function (match, post) {
			return '"' + value + '"' + post;
		});
		str = unescape(str, arr);
		return str;
	}
function processDefinition ( str , name , value ) { var arr = [ ] ; str = escape ( str , arr ) ; str = str . replace ( new RegExp ( '([^#A-Za-z0-9_$]|^)' + name + '\\s*##\\s*([A-Za-z0-9_$]*)' , 'g' ) , function ( match , pre , post ) { return pre + value + post ; } ) ; str = str . replace ( new RegExp ( '([A-Za-z0-9_$]*)\\s*##\\s*' + name + '([^A-Za-z0-9_$]|$)' , 'g' ) , function ( match , pre , post ) { return pre + value + post ; } ) ; str = str . replace ( new RegExp ( '([^#A-Za-z0-9_$]|^)' + name + '([^A-Za-z0-9_$]|$)' , 'g' ) , function ( match , pre , post ) { if ( macros [ value ] != null && ! ( macros [ value ] instanceof Function ) ) value = macros [ value ] ; return pre + value + post ; } ) ; str = str . replace ( new RegExp ( '#' + name + '([^A-Za-z0-9_$]|$)' , 'g' ) , function ( match , post ) { return '"' + value + '"' + post ; } ) ; str = unescape ( str , arr ) ; return str ; }
replace defined variables from a string
replace defined variables from a string
//apply concatenation ENTRY ## something → valueSomething //replace definition entries //insert definition //replace stringifications