File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ export class HTMLDomStrings {
190190 * Check the class to see if it matches the processClass regex
191191 * If the node has a child and is not marked as created by MathJax (data-MJX)
192192 * and either it is marked as restarting processing or is not a tag to be skipped, then
193- * Save the current node and whether we are currently ignoring content
193+ * Save the next node (if there is one) and whether we are currently ignoring content
194194 * Move to the first child node
195195 * Update whether we are ignoring content
196196 * Otherwise
@@ -208,7 +208,9 @@ export class HTMLDomStrings {
208208 let process = this . processClass . exec ( cname ) ;
209209 if ( node . firstChild && ! node . getAttribute ( 'data-MJX' ) &&
210210 ( process || ! this . skipTags . exec ( tname ) ) ) {
211- this . stack . push ( [ node . nextSibling as Element , ignore ] ) ;
211+ if ( node . nextSibling ) {
212+ this . stack . push ( [ node . nextSibling as Element , ignore ] ) ;
213+ }
212214 node = node . firstChild as Element ;
213215 ignore = ( ignore || this . ignoreClass . exec ( cname ) ) && ! process ;
214216 } else {
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ export class CHTML extends AbstractOutputJax {
153153 * @override
154154 */
155155 public styleSheet ( html : MathDocument ) {
156+ this . nodes . document = html . document ;
156157 //
157158 // Gather the CSS from the classes
158159 //
You can’t perform that action at this time.
0 commit comments