Skip to content

Commit

Permalink
feat: Merge pull request #140 from samuele-cozzi:139-external-images-…
Browse files Browse the repository at this point in the history
…dont-appear-in-deck-preview

external images
  • Loading branch information
samuele-cozzi committed Jan 31, 2024
2 parents 5331afe + d9a82af commit 43e829f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/marpPreviewView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class MarpPreviewView extends ItemView {
let { html, css } = this.marp.render(markdownText);

// Replace Backgorund Url for images
html = html.replace(/background-image:url\("/g, `background-image:url("${basePath}`);
html = html.replace(/(?!background-image:url\("http)background-image:url\("/g, `background-image:url("${basePath}`);

const htmlFile = `
<!DOCTYPE html>
Expand Down
11 changes: 11 additions & 0 deletions vault/samples/Sample Minimal.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ text

---


<!-- _class: divider -->

### Introduction

text

![bg right:33%](https://t3.ftcdn.net/jpg/02/48/42/64/360_F_248426448_NVKLywWqArG2ADUxDq6QprtIzsF82dMF.jpg)

---

<!-- _class: divider -->

## Section Header
Expand Down

0 comments on commit 43e829f

Please sign in to comment.