bundles/org.eclipse.orion.client.ui/web/orion/links.js
function(text, parent) {
			//define div if one isn't provided
			var result = parent || document.createElement('div'); //$NON-NLS-0$
			var linkScanners = this._registry.getServiceReferences("orion.core.linkScanner"); //$NON-NLS-0$
			if (linkScanners.length > 0) {
				//TODO: support multiple scanners by picking the scanner with the first match
				var linkScanner = linkScanners[0];
				var pattern = new RegExp(linkScanner.getProperty("pattern"), "i"); //$NON-NLS-1$ //$NON-NLS-0$
				var words= linkScanner.getProperty("words"); //$NON-NLS-0$
				var anchor = linkScanner.getProperty("anchor"); //$NON-NLS-0$
				var index = text.search(pattern);
				while (index >= 0) {
					text = this._replaceLink(text, result, pattern, words, anchor);
					index = text.search(pattern);
				}
			}
			//append a text node for any remaining text
			if (text.length > 0) {
				result.appendChild(document.createTextNode(text));
			}
			return result;
		}
function(text, parent) {
			//define div if one isn't provided
			var result = parent || document.createElement('div'); //$NON-NLS-0$
			var linkScanners = this._registry.getServiceReferences("orion.core.linkScanner"); //$NON-NLS-0$
			if (linkScanners.length > 0) {
				//TODO: support multiple scanners by picking the scanner with the first match
				var linkScanner = linkScanners[0];
				var pattern = new RegExp(linkScanner.getProperty("pattern"), "i"); //$NON-NLS-1$ //$NON-NLS-0$
				var words= linkScanner.getProperty("words"); //$NON-NLS-0$
				var anchor = linkScanner.getProperty("anchor"); //$NON-NLS-0$
				var index = text.search(pattern);
				while (index >= 0) {
					text = this._replaceLink(text, result, pattern, words, anchor);
					index = text.search(pattern);
				}
			}
			//append a text node for any remaining text
			if (text.length > 0) {
				result.appendChild(document.createTextNode(text));
			}
			return result;
		}
function ( text , parent ) { //define div if one isn't provided
 var result = parent || document . createElement ( 'div' ) ; //$NON-NLS-0$
 var linkScanners = this . _registry . getServiceReferences ( "orion.core.linkScanner" ) ; //$NON-NLS-0$
 if ( linkScanners . length > 0 ) { //TODO: support multiple scanners by picking the scanner with the first match
 var linkScanner = linkScanners [ 0 ] ; var pattern = new RegExp ( linkScanner . getProperty ( "pattern" ) , "i" ) ; //$NON-NLS-1$ //$NON-NLS-0$
 var words = linkScanner . getProperty ( "words" ) ; //$NON-NLS-0$
 var anchor = linkScanner . getProperty ( "anchor" ) ; //$NON-NLS-0$
 var index = text . search ( pattern ) ; while ( index >= 0 ) { text = this . _replaceLink ( text , result , pattern , words , anchor ) ; index = text . search ( pattern ) ; } } //append a text node for any remaining text
 if ( text . length > 0 ) { result . appendChild ( document . createTextNode ( text ) ) ; } return result ; }
Adds links to an input text string. The links are added to the provided node, or to a new div
node if not input node is provided.
@param {String} text The string to compute links for
@param {Object} [parent] The optional parent DOM node to place the links into
@returns {Object} A DOM node containing the provided text as a series of text and anchor child nodes
Adds links to an input text string . The links are added to the provided node or to a new div node if not input node is provided .