htmlcssmarkdownjekyllkramdown

Jekyll kramdown: How to disable generating styles in tables?


I have markdown file with standard markdown table:

| AAA | BBB |
|:---:|:---:|
| 1   | 2   |
| 3   | 4   |

Jekyll renders it fine but adds text-align: center; in to style of td:

<table>
    <thead>
        <tr>
            <th style="text-align: center">AAA</th>
            <th style="text-align: center">BBB</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="text-align: center">1</td>
            <td style="text-align: center">2</td>
        </tr>
        <tr>
            <td style="text-align: center">3</td>
            <td style="text-align: center">4</td>
        </tr>
    </tbody>
</table>

how to disable this so jekyll does not add any styles to table elements ?
Thank you for help


I have Jekyll 4.3.2 and this is contents of my _config.yml:

highlighter: rouge
markdown: kramdown
kramdown:
    extensions:
     - Hard_wrap
     - no_intra_emphasis
     - strikethrough
     - fenced_code_blocks
     - autolink
     - with_toc_data
     - highlight
     - footnotes
    input: GFM
sass:
    style: :compressed
permalink: "/:title/"
slugify: "pretty"

Solution

  • The solution was to remove colons from hrader separator:

    | AAA | BBB |
    |-----|-----|
    | 1   | 2   |
    | 3   | 4   |