quarto-dev / quarto-dev/quarto-cli

Using meta shortcode in a grid table creates an extra column

Open
#10,069 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When I define the date-modified metadata in yaml header of quarto document, and use the {{< meta date-modified >}} in a grid table, an extra column is created to the right. It doesn't happen in regular markdown tables. It happens in several output formats I've tried (odt, docx, html, pdf).

Code to reproduce:

---
title: "Untitled"
date-modified: today
format: odt
---

This grid table with the date in plain text shows 2 columns as defined:

+-------------------+----------------------------+
| **Date created**  | 2021-07-12                 |
+-------------------+----------------------------+
| **Date modified** | 2024-06-19                 |
+-------------------+----------------------------+
: {tbl-colwidths="\[50,50\]"}


This grid table using the date-modified shortcode shows 3 columns instead of 2:

+-------------------+----------------------------+
| **Date created**  | 2021-07-12                 |
+-------------------+----------------------------+
| **Date modified** | {{< meta date-modified >}} |
+-------------------+----------------------------+
: {tbl-colwidths="\[50,50\]"}

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.

Research direction

Start with the supplied Quarto document and compare the grid-table case using the meta shortcode with the plain-text and regular Markdown table cases. Check the generated ODT, DOCX, HTML, and PDF outputs; the work is done when the shortcode renders inside the existing cell without creating a third column.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, yaml
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.