demos/demo-js/src/prism.js
function (inside, before, insert, root) {
			root = root || _.languages;
			var grammar = root[inside];
			var ret = {};
				
			for (var token in grammar) {
			
				if (grammar.hasOwnProperty(token)) {
					
					if (token == before) {
					
						for (var newToken in insert) {
						
							if (insert.hasOwnProperty(newToken)) {
								ret[newToken] = insert[newToken];
							}
						}
					}
					
					ret[token] = grammar[token];
				}
			}
			
			return root[inside] = ret;
		}
function (inside, before, insert, root) {
			root = root || _.languages;
			var grammar = root[inside];
			var ret = {};
				
			for (var token in grammar) {
			
				if (grammar.hasOwnProperty(token)) {
					
					if (token == before) {
					
						for (var newToken in insert) {
						
							if (insert.hasOwnProperty(newToken)) {
								ret[newToken] = insert[newToken];
							}
						}
					}
					
					ret[token] = grammar[token];
				}
			}
			
			return root[inside] = ret;
		}
function ( inside , before , insert , root ) { root = root || _ . languages ; var grammar = root [ inside ] ; var ret = { } ; for ( var token in grammar ) { if ( grammar . hasOwnProperty ( token ) ) { if ( token == before ) { for ( var newToken in insert ) { if ( insert . hasOwnProperty ( newToken ) ) { ret [ newToken ] = insert [ newToken ] ; } } } ret [ token ] = grammar [ token ] ; } } return root [ inside ] = ret ; }
Insert a token before another token in a language literal
Insert a token before another token in a language literal