Handle SVG correctly in page normalization

Related to mathjax/MathJax-node#65
This commit is contained in:
Samy Pessé
2015-02-05 17:36:44 +01:00
parent 532e8b0388
commit 8cc0f64f54
+8 -1
View File
@@ -78,7 +78,14 @@ function pregQuote( str ) {
// Adapt an html snippet to be relative to a base folder
function normalizeHtml(src, options) {
var $ = cheerio.load(src, { xmlMode: false});
var $ = cheerio.load(src, {
// We should parse html without trying to normalize too much
xmlMode: false,
// SVG need some attributes to use uppercases
lowerCaseAttributeNames: false,
lowerCaseTags: false
});
var toConvert = [];
var svgContent = {};
var outputRoot = options.book.options.output;