apache-mod-markdown icon indicating copy to clipboard operation
apache-mod-markdown copied to clipboard

Single tick ` and triple tick ``` both render as <code>

Open AdvancedStyle opened this issue 7 years ago • 2 comments

Both [single tick] and [triple tick] are rendered as tags, so it's not possible to use CSS to make code blocks.

It would be expected that [single tick] render to and [triple tick] render to

AdvancedStyle avatar Jun 01 '18 09:06 AdvancedStyle

I believe that this would have been rectified using the new default flags that I suggested as part of #26

netniV avatar Jul 30 '18 14:07 netniV

Single ticks are rendered as <code>...</code>. Triple ticks are rendered as <pre><code>...</code></pre>. So they can be distinguished in CSS. This is what I do in my style.css:

code {
        background-color: #eeeeee;
        padding-left: 0.2em;
        padding-right: 0.2em;
}

pre > code {
        padding-left: 0;
        padding-right: 0;
}

pre {
        background-color: #eeeeee;
        padding: 0.5em;
        border-left: 0.5em solid #cccccc;
}

softins avatar Jun 16 '20 20:06 softins