The HTMLElement node class
The Text node class
The Document class
The user-supplied options
The DOM Adaptor to managing HTML elements
Protected
ignoreRegular expression for which classes should stop processing of math
Protected
nodesThe list of node lists corresponding to the strings in this.strings
The options for this instance
Protected
processRegular expression for which classes should start processing of math
Protected
skipRegular expression for the tags to be skipped processing of math
Protected
snodesThe list of nodes and lengths for the string being constructed
Protected
stackThe container nodes that are currently being traversed, and whether their contents are being ignored or not
Protected
stringThe string currently being constructed
Protected
stringsThe array of strings found in the DOM
Static
OPTIONSThe default options for string processing
Protected
extendFind the strings for a given DOM element: Initialize the state Get the element where we stop processing While we still have a node, and it is not the one where we are to stop: If it is a text node, handle it and get the next node Otherwise, if it is in the includeHtmlTags list, handle it and get the next node Otherwise, handle it as a container and get the next node and ignore status If there is no next node, and there are more nodes on the stack: Save the current string, and pop the node and ignore status from the stack Push the final string Get the string array and array of associated DOM nodes Clear the internal values (so the memory can be freed) Return the strings and node lists
The array of strings and their associated lists of nodes
Protected
getCreate the search patterns for skipHtmlTags, ignoreHtmlClass, and processHtmlClass
Protected
handleHandle an arbitrary DOM node: Check the class to see if it matches the processHtmlClass regex If the node has a child and is not marked as created by MathJax (data-MJX) and either it is marked as restarting processing or is not a tag to be skipped, then Save the next node (if there is one) and whether we are currently ignoring content Move to the first child node Update whether we are ignoring content Otherwise Move on to the next sibling Return the next node to process and the ignore state
The node to process
Whether we are currently ignoring content
The next element to process and whether to ignore its content
Protected
handleProtected
handleProtected
handleProtected
initSet the initial values of the main properties
Protected
pushAdd a string to the string array and record its node list
The HTMLDocument class (extends AbstractMathDocument)
A class for extracting the text from DOM trees