context: var _DoLists = function(text) {//// Form HTML ordered (numbered) and unordered (bulleted) lists.//	// attacklab: add sentinel to hack around khtml/safari bug:	// http://bugs.webkit.org/show_bug.cgi?id=11231	text += "~0";	// Re-usable pattern to match any entirel ul or ol list:	/*		var whole_list = /		(									// $1 = whole list			(								// $2				[ ]{0,3}					// attacklab: g_tab_width - 1				([*+-]|\d+[.])				// $3 = first list item marker				[ \t]+			)			[^\r]+?			(								// $4				~0							// sentinel for workaround; should be $			|				\n{2,}				(?=\S)				(?!							// Negative lookahead for another list item marker					[ \t]*					(?:[*+-]|\d+[.])[ \t]+				)			)		)/g	*/	var whole_list = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;	if (g_list_level) {		text = text.replace(whole_list,function(wholeMatch,m1,m2) {			var list = m1;			var list_type = (m2.search(/[*+-]/g)>-1) ? "ul" : "ol";			// Turn double returns into triple returns, so that we can make a			// paragraph for the last item in a list, if necessary:			list = list.replace(/\n{2,}/g,"\n\n\n");;			var result = _ProcessListItems(list);				// Trim any trailing whitespace, to put the closing `</$list_type>`			// up on the preceding line, to get it past the current stupid			// HTML block parser. This is a hack to work around the terrible			// hack that is the HTML block parser.			result = result.replace(/\s+$/,"");			result = "<"+list_type+">" + result + "</"+list_type+">\n";			return result;		});	} else {		whole_list = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;		text = text.replace(whole_list,function(wholeMatch,m1,m2,m3) {			var runup = m1;			var list = m2;			var list_type = (m3.search(/[*+-]/g)>-1) ? "ul" : "ol";			// Turn double returns into triple returns, so that we can make a			// paragraph for the last item in a list, if necessary:			var list = list.replace(/\n{2,}/g,"\n\n\n");;			var result = _ProcessListItems(list);			result = runup + "<"+list_type+">\n" + result + "</"+list_type+">\n";				return result;		});	}	// attacklab: strip sentinel	text = text.replace(/~0/,"");	return text;}
meta: 6317	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6317/bb7ba4f85620c5ad07e48227c0a1b87153a9c92a/showdown.js/clean/Docs/assets/showdown.js