Skip to content

Commit

Permalink
Fix _getSnapshotLocation() logic
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeJellinek committed Apr 26, 2024
1 parent c45a338 commit 46c061d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dom/snapshot/snapshot-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ class SnapshotView extends DOMView<SnapshotViewState, SnapshotViewData> {
let singleFileComment = this._iframeDocument.documentElement.firstChild;
if (singleFileComment?.nodeType === Node.COMMENT_NODE
&& singleFileComment.nodeValue!.trim().startsWith('Page saved with SingleFile')) {
let matches = singleFileComment.nodeValue!.match(/^\s*url: (https?:\/\/.+)$/m);
let matches = singleFileComment.nodeValue!.match(/^\s*url: (https?:\/\/\S+)/m);
if (matches) {
return matches[0].trim();
return matches[1];
}
}
return null;
Expand Down

0 comments on commit 46c061d

Please sign in to comment.