Improve validation for layout to help distill conversion ?
@cderv 已经在做这个了。
开始于 2022年11月15日。
评估
这个 Issue 还没有评估数据。
描述
Bug description
distill has also a layout option, and for now if the option is not correctly converted to Quarto supported one then there is an useful error
- Content from distill without using YAML syntax
---
title: "A small example"
format: html
page-layout: article
---
```{r setup, layout="l-body-outset"}
mtcars[,1:3] |> head()
```
- After conversion using
knitr::convert_chunk_header()
---
title: "A small example"
format: html
page-layout: article
---
```{r}
#| layout: l-body-outset
mtcars[,1:3] |> head()
```
in both case, we'll have this issue
Error running filter C:/Users/chris/scoop/apps/quarto-prerelease/current/share/filters/layout/layout.lua:
...prerelease\current\bin\..\share\pandoc\datadir\_json.lua:167: bad 'for' initial value (number expected, got nil)
stack traceback:
...prerelease\current\bin\..\share\pandoc\datadir\_json.lua:381: in function '_json.decode'
...uarto-prerelease/current/share/filters/layout/layout.lua:3641: in function 'parseLayoutWidths'
...uarto-prerelease/current/share/filters/layout/layout.lua:4274: in function 'layoutCells'
...uarto-prerelease/current/share/filters/layout/layout.lua:4098: in function <...uarto-prerelease/current/share/filters/layout/layout.lua:4091>
ERROR: unexpected character 'l' at line 1 col 1
Not so useful.
And in the second case, YAML validation does not help to detect that. No error detected for the layout field in the chunk for me.
Can we do better in the error or at least in the validation ?
quarto check Output
$ quarto check
[>] Checking Quarto installation......OK
Version: 1.1.80
Path: C:\Users\chris\scoop\apps\quarto-prerelease\current\bin\
CodePage: unknown
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.9.13
Path: C:/Users/chris/scoop/apps/pyenv/current/pyenv-win/versions/3.9.13/python3.exe
Jupyter: 4.11.1
Kernels: bash, julia-1.7, python3
[>] Checking Jupyter engine render....OK
(\) Checking R installation...........++ Activating rlang global_entrace
++ Setting QUARTO_PYTHON
[>] Checking R installation...........OK
Version: 4.2.0
Path: C:/PROGRA~1/R/R-42~1.0
LibPaths:
- C:/Users/chris/AppData/Local/R/win-library/4.2
- C:/Program Files/R/R-4.2.0/library
rmarkdown: 2.14.3
[>] Checking Knitr engine render......OK
- 主要语言
- JavaScript
- 星标
- 6k
- 派生
- 458
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 41
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
quarto-dev/quarto-cli 的其他 Issue
-
binder bug
难度 1/5 1 小时以内 新手友好度 92/100
quarto-dev/quarto-cli#14907 · 3 条评论 ·
-
brand bug
难度 2/5 1-3 小时 新手友好度 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
难度 2/5 1-3 小时 新手友好度 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them 未关闭engines-jupyter enhancement
难度 2/5 1-3 小时 新手友好度 84/100
quarto-dev/quarto-cli#14850 · 2 条评论 ·
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
code-quality refactoring
难度 2/5 1-3 小时 新手友好度 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
难度 2/5 1-3 小时 新手友好度 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
难度 2/5 1-3 小时 新手友好度 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 88/100