function correctErrorPosition( error, offset ) {
		offset = offset || 0;
		error.position += offset;

		// Look for "… got '…' …" error message to adjust the position
		// (this will probably be broken by KaTeX updates).

		var matches = error.message.match( /got\s'(.*?)'/ );
		if ( matches !== null ) {
			// Text: "… got '…' …"
			error.position -= matches[1].length;
		}
	}
/**
	 * Change the `position` property of an error object thrown by KaTeX to get
	 * a more accurate error position. Mutates the passed object.
	 */
Change the `position` property of an error object thrown by KaTeX to get
a more accurate error position. Mutates the passed object.
Change the ` position ` property of an error object thrown by KaTeX to get a more accurate error position . Mutates the passed object .
function correctErrorPosition( error, offset ) {
		offset = offset || 0;
		error.position += offset;
		var matches = error.message.match( /got\s'(.*?)'/ );
		if ( matches !== null ) {
			error.position -= matches[1].length;
		}
	}
function correctErrorPosition ( error , offset ) { offset = offset || 0 ; error . position += offset ; var matches = error . message . match ( / got\s'(.*?)' / ) ; if ( matches !== null ) { error . position -= matches [ 1 ] . length ; } }
Change the `position` property of an error object thrown by KaTeX to get
 a more accurate error position.
Change the ` position ` property of an error object thrown by KaTeX to get a more accurate error position .
// Look for "… got '…' …" error message to adjust the position // (this will probably be broken by KaTeX updates). // Text: "… got '…' …"