mirror of
https://github.com/foliojs/pdfkit.git
synced 2026-02-01 16:56:57 +00:00
Co-authored-by: Your Name <you@example.com>
This commit is contained in:
parent
ebf404e4ae
commit
2d5b4160ad
@ -16,7 +16,7 @@ class PDFImage {
|
||||
data = Buffer.from(new Uint8Array(src));
|
||||
} else {
|
||||
let match;
|
||||
if ((match = /^data:.+;base64,(.*)$/.exec(src))) {
|
||||
if ((match = /^data:.+?;base64,(.*)$/.exec(src))) {
|
||||
data = Buffer.from(match[1], 'base64');
|
||||
} else {
|
||||
data = fs.readFileSync(src);
|
||||
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
data = Buffer.from(new Uint8Array(src));
|
||||
} else {
|
||||
let match;
|
||||
if ((match = /^data:(.*);base64,(.*)$/.exec(src))) {
|
||||
if ((match = /^data:(.*?);base64,(.*)$/.exec(src))) {
|
||||
if (match[1]) {
|
||||
refBody.Subtype = match[1].replace('/', '#2F');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user