I’m using Redcarpet for my markdown, and sometimes want to render specific paragraphs with css classes:
<p>normal paragraph</p>
<p class="specific">special css paragraph</p>
<p class="specific">special css paragraph</p>
<p>normal paragraph</p>
Usually the paragraphs are in groups, so I tried
<div class="specific">
special css paragraph
special css paragraph
</div>
But the renderer doesn’t insert <p>
tags, so the output all runs together:
<div class="specific">
special css paragraph special css paragraph
</div>
I know I can put <p>
tags around each paragraph, but that seems to defeat the purpose of using a Markdown parser.
Is there an “easy” way to style specific paragraphs with markdown, specifically Redcarpet, if possible?
For a bit of context, here is the repo for this project, and its current front page on archive.today