pptxtojson 1.3.2 → 1.5.0
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/README.md +8 -5
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/rollup.config.js +5 -0
- package/src/fill.js +4 -2
- package/src/pptxtojson.js +20 -1
- package/src/shapePath.js +4635 -0
- package/src/utils.js +4 -1
package/src/utils.js
CHANGED
|
@@ -151,7 +151,10 @@ export function toHex(n) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
export function hasValidText(htmlString) {
|
|
154
|
-
if (
|
|
154
|
+
if (typeof DOMParser === 'undefined') {
|
|
155
|
+
const text = htmlString.replace(/<[^>]+>/g, '').replace(/\s+/g, ' ')
|
|
156
|
+
return text.trim() !== ''
|
|
157
|
+
}
|
|
155
158
|
|
|
156
159
|
const parser = new DOMParser()
|
|
157
160
|
const doc = parser.parseFromString(htmlString, 'text/html')
|