-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Arzte/download-backpack
Add backpack downloading Inital attempt
- Loading branch information
Showing
7 changed files
with
259 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/lib/inline.js b/lib/inline.js | ||
index 10970092d2efa9c5c120b4843b17ebc359fe1360..66ce98d611f0556fa644141296750e48a39c1371 100644 | ||
--- a/lib/inline.js | ||
+++ b/lib/inline.js | ||
@@ -18,7 +18,9 @@ export async function inlineResources(element) { | ||
(async () => { | ||
var _a; | ||
if (isSVGImageElement(element)) { | ||
- const blob = await withTimeout(10000, `Timeout fetching ${element.href.baseVal}`, () => fetchResource(element.href.baseVal)); | ||
+ const elementHref = element.getAttribute('href') || element.getAttribute('xlink:href'); | ||
+ assert(elementHref, '<image> element must have href or xlink:href attribute'); | ||
+ const blob = await withTimeout(10000, `Timeout fetching ${elementHref}`, () => fetchResource(elementHref)); | ||
if (blob.type === 'image/svg+xml') { | ||
// If the image is an SVG, inline it into the output SVG. | ||
// Some tools (e.g. Figma) do not support nested SVG. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
"@vueuse/core": "^11.0.3", | ||
"@vueuse/nuxt": "^11.0.3", | ||
"bootstrap": "5.3.*", | ||
"dom-to-svg": "^0.12.2", | ||
"handlebars": "^4.7.8", | ||
"perfect-debounce": "^1.0.0", | ||
"pinia": "^2.2.2", | ||
|
@@ -53,5 +54,8 @@ | |
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": "^20.16.3" | ||
}, | ||
"resolutions": { | ||
"dom-to-svg@^0.12.2": "patch:dom-to-svg@npm%3A0.12.2#./.yarn/patches/dom-to-svg-npm-0.12.2-dfe442df49.patch" | ||
} | ||
} |
Oops, something went wrong.