Add class to table rows in Kramdown
23:31 20 Feb 2017

In kramdown, it is generally easy to add a class to some bit of text. Here, for example, is a blockquote:

> This is a blockquote.
{:.example}

HTML output:

This is a blockquote.

While this technique works in many places, it doesn't appear to work with tables. I want to set a class on a table row. I expect the following to do the trick:

...
|one|two|three|{:.example}
...

In other words, I expect the following partial output:


...

What I actually get is this:


  one
  two
  three
  {:.example}

I realize that I could just write the table in HTML, but I'd prefer to have the readability benefit of kramdown. Is it possible to do what I want in kramdown? If not, is there a better solution than dropping to HTML?

markdown jekyll kramdown