Skip to content

Commit 56329de

Browse files
committed
Merge branch 'issue78' into alpha
2 parents e855eda + 8c2cee3 commit 56329de

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mathjax3-ts/handlers/html/HTMLDomStrings.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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 {

mathjax3-ts/output/chtml.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
//

0 commit comments

Comments
 (0)