Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature Request: Support table caption syntax (e.g. Pandoc style) #1104

@amiroo54

Description

@amiroo54

Currently, pulldown-cmark supports GitHub Flavored Markdown tables but not captions. Adding support for Pandoc-style table captions would unlock cross‑referencing capabilities in downstream tools.

Proposed Syntax:

Allow an optional caption line that can be placed either above or below the table:
markdown:

| Column1 | Column2 |
|------|-----|
| Text1  | Text2  |
| Text3  | Text4  |
: Example Caption for Table

To HTML:

<table>
  <caption>Example Caption for Table</caption>
  <thead><tr><th>Column1</th><th>Column2</th></table></thead>
  <tbody><tr><td>Text1</td><td>Text2</td></tr>...</tbody>
</table>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions