Make HTML snippet handler accept a string as contents, even if not enclosed in braces. (Resolves issue reported by Fred in test suite for Parsing/issue228.html)

This commit is contained in:
Davide P. Cervone 2012-08-17 10:27:54 -04:00
parent 803f6fa211
commit 01113c0921
2 changed files with 3 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ if (!window.MathJax) {window.MathJax= {}}
if (!MathJax.Hub) { // skip if already loaded
MathJax.version = "2.0";
MathJax.fileversion = "2.0.4";
MathJax.fileversion = "2.0.5";
/**********************************************************/
@ -966,6 +966,7 @@ MathJax.HTML = {
MathJax.Hub.Insert(obj,def);
}
if (contents) {
if (!(contents instanceof Array)) {contents = [contents]}
for (var i = 0; i < contents.length; i++) {
if (contents[i] instanceof Array) {
obj.appendChild(this.Element(contents[i][0],contents[i][1],contents[i][2]));