Markdown leads to paragraphs in table cells


I am setting up a HTML table based on YML structure fields. Some passages of the table entries are publication and exhibition titles. These passages have to be italic, for instance:

Selected. Gerrit Rietveld Academie Awards, Looiersgracht60, Amsterdam

Usually, I would code it like that:

<td><i>Selected. Gerrit Rietveld Academie Awards</i>, Looiersgracht60, Amsterdam</td>

Markdown gives:

<td><p><em>Selected. Gerrit Rietveld Academie Awards</em>, Looiersgracht60, Amsterdam</p></td>

In this typographic case, I think the <i> tag is better than the <em> tag.

  1. How can I eliminate the <p> tag inside the <td> tag? I do not need it here.
  2. How can I use the <i> tag instead of the <em> tag here?

Looking forward to your advice

Kirby is great! :smiling_face_with_three_hearts:

Not completly sure this will help but if you enable markdown extra, that will let you do markdown tables…

Im thinking that will give you cleaner output.

Might also be worth looking into @texnixe lovely Spreadsheet plugin which will render a table from an uploaded spreadsheet. You should be able to get the html you want by modifying the snippet.

If you output your content with kti()/kirbytextinline() instead of kirbytext(), you shouldn’t run into this.


Thank you! Yes, kirbytextinline() eliminates the <p> tag.