quarto-dev / quarto-dev/quarto-cli

Date YAML is processed before shortcode is evaluated

Open
#9,419 6 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Apr 19, 2024.

enhancement
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

It seems the date YAML is processed before the shortcode is evaluated.

Steps to reproduce

For index.qmd:

---
title: "{{< var date >}}"
date: "{{< var date >}}"
---

_variables.yml

date: 2024/04/19
Expected behavior

The result should be the same as below:

---
title: "{{< var date >}}"
date: "2024/04/19"
---
Screenshot 2024-04-19 at 6 18 31 PM
Actual behavior

Results in Invalid Date

Screenshot 2024-04-19 at 6 13 16 PM
Your environment
  • IDE: RStudio 2023.12.1+402 (2023.12.1+402)
  • OS: MacOS Sonoma 14.4.1
Quarto check output

Quarto 1.5.30
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.13: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.30
Path: /Applications/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /Library/TeX/texbin
Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.9.6
Path: /Users/emitanaka/.virtualenvs/r-reticulate/bin/python3
Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
Version: 4.3.3
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.45
rmarkdown: 2.26

[✓] Checking Knitr engine render......OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.