quarto-dev / quarto-dev/quarto-cli
filename argument not working for ojs code blocks
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
When using the filename argument within an ojs code block, the ojs filename is not added.
Steps to reproduce
---
title: "No ojs file name :("
format: html
---
```{r filename = "R"}
ojs_define(iris = iris)
```
```{ojs filename = "ojs"}
iris
```
Expected behavior
No response
Actual behavior
No response
Your environment
No response
Quarto check output
Quarto 1.6.30
[✓] Checking environment information...
Quarto cache location: /home/user/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.30
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2024.07.03
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/user/.TinyTeX/bin/x86_64-linux
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.2 (Conda)
Path: /home/user/miniconda3/bin/python
Jupyter: 5.7.2
Kernels: python3
Traceback (most recent call last):
File "/opt/quarto/share/jupyter/jupyter.py", line 21, in
from notebook import notebook_execute, RestartKernel
File "/opt/quarto/share/jupyter/notebook.py", line 15, in
from yaml import safe_load as parse_string
ModuleNotFoundError: No module named 'yaml'
[✓] Checking Jupyter engine render....OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by rendering the provided .qmd reproduction with Quarto 1.6.30 and inspect how the filename argument is handled for {ojs} code blocks. Confirm the fix when the rendered HTML includes the ojs filename while preserving the existing R filename behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100