html2canvas-pro 2.4.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html2canvas-pro.cjs +13 -3
- package/dist/html2canvas-pro.cjs.map +1 -1
- package/dist/html2canvas-pro.esm.js +13 -3
- package/dist/html2canvas-pro.esm.js.map +1 -1
- package/dist/html2canvas-pro.js +13 -3
- package/dist/html2canvas-pro.js.map +1 -1
- package/dist/html2canvas-pro.min.js +2 -2
- package/dist/lib/css/property-descriptors/font-family.js +16 -1
- package/package.json +1 -1
package/dist/html2canvas-pro.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* html2canvas-pro 2.4.
|
|
2
|
+
* html2canvas-pro 2.4.3 <https://yorickshan.github.io/html2canvas-pro/>
|
|
3
3
|
* Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
|
|
4
4
|
* Released under MIT License
|
|
5
5
|
*/
|
|
@@ -5331,10 +5331,15 @@
|
|
|
5331
5331
|
parse: (_context, tokens) => {
|
|
5332
5332
|
const accumulator = [];
|
|
5333
5333
|
const results = [];
|
|
5334
|
+
const quoted = [];
|
|
5335
|
+
let isQuoted = false;
|
|
5334
5336
|
tokens.forEach((token) => {
|
|
5335
5337
|
switch (token.type) {
|
|
5336
5338
|
case 20:
|
|
5339
|
+
accumulator.push(token.value);
|
|
5340
|
+
break;
|
|
5337
5341
|
case 0:
|
|
5342
|
+
isQuoted = true;
|
|
5338
5343
|
accumulator.push(token.value);
|
|
5339
5344
|
break;
|
|
5340
5345
|
case 17:
|
|
@@ -5342,12 +5347,17 @@
|
|
|
5342
5347
|
break;
|
|
5343
5348
|
case 4:
|
|
5344
5349
|
results.push(accumulator.join(" "));
|
|
5350
|
+
quoted.push(isQuoted);
|
|
5351
|
+
isQuoted = false;
|
|
5345
5352
|
accumulator.length = 0;
|
|
5346
5353
|
break;
|
|
5347
5354
|
}
|
|
5348
5355
|
});
|
|
5349
|
-
if (accumulator.length)
|
|
5350
|
-
|
|
5356
|
+
if (accumulator.length) {
|
|
5357
|
+
results.push(accumulator.join(" "));
|
|
5358
|
+
quoted.push(isQuoted);
|
|
5359
|
+
}
|
|
5360
|
+
return results.map((result, index) => quoted[index] || result.indexOf(" ") !== -1 ? `'${result.replace(/\\/g, "\\\\").replace(/'/g, "\\'").replace(/\n/g, "\\a ").replace(/\r/g, "\\d ").replace(/\f/g, "\\c ")}'` : result);
|
|
5351
5361
|
}
|
|
5352
5362
|
};
|
|
5353
5363
|
//#endregion
|