gettalong / kramdown

kramdown is a fast, pure Ruby Markdown superset converter, using a strict syntax definition and supporting several common extensions.
http://kramdown.gettalong.org
Other
1.72k stars 275 forks source link

Jekyll kramdown: How to disable generating styles in tables? #796

Closed yagarea closed 10 months ago

yagarea commented 10 months ago

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
    style: :compressed
permalink: "/:title/"
slugify: "pretty"
gettalong commented 10 months ago

See https://kramdown.gettalong.org/syntax.html#tables for details but tl;dr: Don't use colons in the header separator line.