quarto-dev / quarto-dev/quarto-cli
Missing shortcode when used as first item in list-table
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
Hello,
this is a follow-up of https://github.com/pandoc-ext/list-table/issues/14 .
When using the list-table extension and placing a shortcode as first item in the table, then it get's mixed with the table styling syntax of list-table.
Steps to reproduce
---
title: Untitled
format:
pdf: default
filters:
- pandoc-ext/list-table
author: me
date: last-modified
---
- {{< meta title >}} Title is there
:::{.list-table}
* - {{< meta title >}} Title is missing
* - The title {{< meta title >}} is there
:::
Actual behavior
The first occurence of the shortcode in the table is missing.
The reason is that a Span can be also used to tweak the style of the table and while handling this it gets moved to the attributes of the table.
[BulletList [[Plain [Span ("",[],[("__quarto_custom","true"),("__quarto_custom_type","Shortcode"),("__quarto_custom_context","Inline"),("__quarto_custom_id","2")]) [],Space,Str "Fancy",Space,Str "Latex",Space,Str "missing"]]]]
[Plain [Span ("",[],[("__quarto_custom","true"),("__quarto_custom_type","Shortcode"),("__quarto_custom_context","Inline"),("__quarto_custom_id","2")]) [],Space,Str "Fancy",Space,Str "Latex",Space,Str "missing"]]
[BulletList [[Plain [Str "From",Space,Span ("",[],[("__quarto_custom","true"),("__quarto_custom_type","Shortcode"),("__quarto_custom_context","Inline"),("__quarto_custom_id","3")]) [],Space,Str "to",Space,Span ("",[],[("__quarto_custom","true"),("__quarto_custom_type","Shortcode"),("__quarto_custom_context","Inline"),("__quarto_custom_id","4")]) []]]]]
[Plain [Str "From",Space,Span ("",[],[("__quarto_custom","true"),("__quarto_custom_type","Shortcode"),("__quarto_custom_context","Inline"),("__quarto_custom_id","3")]) [],Space,Str "to",Space,Span ("",[],[("__quarto_custom","true"),("__quarto_custom_type","Shortcode"),("__quarto_custom_context","Inline"),("__quarto_custom_id","4")]) []]]
Expected behavior
No response
Your environment
MacOS 15.7.1
Quarto check output
Quarto 1.8.25
[✓] Checking environment information...
Quarto cache location: /Users/becker/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.3.1: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.8.25
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2024.09
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/becker/Library/TinyTeX/bin/universal-darwin
Version: 2024
[✓] Checking Chrome Headless....................OK
Chrome: (not detected)
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.13.7
Path: /opt/homebrew/opt/python@3.13/bin/python3.13
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
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 reproducing the provided .qmd example with the Quarto CLI and the pandoc-ext/list-table filter, then inspect the list-table handling of the first table item and its shortcode Span. Done means the shortcode in the first list-table item is preserved and rendered consistently with the other shortcode occurrences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, markdown
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100