Skip to content

Missing shortcode when used as first item in list-table #13648

@MBe-iUS

Description

@MBe-iUS

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 pandoc-ext/list-table#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/[email protected]/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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingshortcodesissues related to shortcodestablesIssues with Tables including the gt integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions