Gildas hace 7 años
padre
commit
06e7e5b1b8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/single-file/serializer.js

+ 1 - 1
lib/single-file/serializer.js

@@ -72,7 +72,7 @@ this.serializer = this.serializer || (() => {
 		Array.from(element.attributes).forEach(attribute => {
 			let value = attribute.value;
 			if (attribute.name == "class") {
-				value = element.classList.toString();
+				value = element.classList.toString().trim();
 			}
 			value = value.replace(/&/g, "&").replace(/\u00a0/g, " ").replace(/"/g, """);
 			const validUnquotedValue = value.match(/^[^ \t\n\f\r"'`=<>]+$/);