Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions news/changelog-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ All changes included in 1.8:

- [#13316](https://github.com/quarto-dev/quarto-cli/issues/13316): `code-line-numbers: "1"` correctly highlight the first line now.

### `markdown` formats

- ([#12630])(https://github.com/quarto-dev/quarto-cli/issues/12630)): emit image element for `video` shortcodes targeting local videos.

## Projects

### `website`
Expand Down
9 changes: 9 additions & 0 deletions src/resources/extensions/quarto/video/video.lua
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,15 @@ return {
return htmlVideo(srcValue, heightValue, widthValue, titleValue, startValue, aspectRatio)
elseif quarto.doc.is_format("asciidoc") then
return asciidocVideo(srcValue, heightValue, widthValue, titleValue, startValue, aspectRatio)
elseif quarto.doc.is_format("markdown") then
if srcValue:sub(1, 4) == "http" then
-- For remote videos, we can emit a link
return pandoc.Link(srcValue, titleValue or srcValue)
else
-- For local
-- use an image to allow markdown previewers to show video
return pandoc.Image(quarto.utils.as_inlines(titleValue), srcValue)
end
else
-- Fall-back to a link of the source
return pandoc.Link(srcValue, srcValue)
Expand Down
11 changes: 11 additions & 0 deletions tests/docs/smoke-all/2025/09/03/issue-12630.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: hello
_quarto:
tests:
gfm:
ensureFileRegexMatches:
- - "\\!\\[\\]\\(local.mp4\\)"
- []
---

{{< video local.mp4 >}}
Loading