Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec: missing support for table caption #150

Open
kenhys opened this issue Jul 18, 2022 · 0 comments
Open

spec: missing support for table caption #150

kenhys opened this issue Jul 18, 2022 · 0 comments
Assignees
Labels
spec Spec related thing

Comments

@kenhys
Copy link

kenhys commented Jul 18, 2022

Goals

Support markup of pre/post table caption

Prior Art

pandoc supports the following syntax.

: This is title

|item|description|
|-----|-----|
|aaa|explanation|

It will be converted into:

% pandoc table-pre-title.md
<table>
<caption>This is title</caption>
<thead>
<tr class="header">
<th>item</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>aaa</td>
<td>explanation</td>
</tr>
</tbody>
</table>

Then, the other syntax is:


|item|description|
|-----|-----|
|aaa|explanation|

Table: This is title

It will be converted into:

% pandoc table-post-title.md
<table>
<caption>This is title</caption>
<thead>
<tr class="header">
<th>item</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>aaa</td>
<td>explanation</td>
</tr>
</tbody>
</table>

Above samples were checked with:

% pandoc --version
pandoc 2.18

VFM results

% vfm --version
1.1.0
% vfm table-pre-title.md
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    <p>: This is title</p>
    <table>
      <thead>
        <tr>
          <th>item</th>
          <th>description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>aaa</td>
          <td>explanation</td>
        </tr>
      </tbody>
    </table>
  </body>
</html>
% vfm table-post-title.md
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    <table>
      <thead>
        <tr>
          <th>item</th>
          <th>description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>aaa</td>
          <td>explanation</td>
        </tr>
      </tbody>
    </table>
    <p>Table: This is title</p>
  </body>
</html>
@kenhys kenhys added the spec Spec related thing label Jul 18, 2022
@akabekobeko akabekobeko self-assigned this Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec Spec related thing
Projects
None yet
Development

No branches or pull requests

2 participants