Skip to content

Commit 3395431

Browse files
committed
ensure video shortcode works with embed-resources and self-contained
1 parent 47577cd commit 3395431

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

news/changelog-1.3.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
## Miscellaneous
12

3+
- ensure `video` shortcode works with `embed-resources` and `self-contained` ([#3310](https://github.com/quarto-dev/quarto-cli/issues/3310))

src/resources/extensions/quarto/video/video.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ local youTubeBuilder = function(params)
7777
local YOUTUBE_EMBED = 'https://www.youtube.com/embed/'
7878
params.src = YOUTUBE_EMBED .. match
7979

80-
local SNIPPET = [[<iframe src="{src}{start}"{width}{height} title="{title}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>]]
80+
local SNIPPET = [[<iframe data-external="1" src="{src}{start}"{width}{height} title="{title}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>]]
8181
snippet = replaceCommonAttributes(SNIPPET, params)
8282

8383
local result = {}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Quarto"
3+
format:
4+
html:
5+
toc: true
6+
#self-contained: true
7+
_quarto:
8+
tests:
9+
html:
10+
ensureHtmlElements:
11+
- ["iframe[data-external=\"1\"]"]
12+
---
13+
{{< video https://www.youtube.com/embed/wo9vZccmqwc >}}

0 commit comments

Comments
 (0)