mirror of
https://github.com/samuele-cozzi/obsidian-marp-slides.git
synced 2026-07-22 07:40:25 +00:00
feat: Merge pull request #140 from samuele-cozzi:139-external-images-dont-appear-in-deck-preview
external images
This commit is contained in:
commit
43e829fe4e
2 changed files with 12 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,17 @@ text
|
|||
|
||||
---
|
||||
|
||||
|
||||
<!-- _class: divider -->
|
||||
|
||||
### Introduction
|
||||
|
||||
text
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
<!-- _class: divider -->
|
||||
|
||||
## Section Header
|
||||
|
|
|
|||
Loading…
Reference in a new issue