Separate styling for inline and multi-line code blocks!
So what some other Markdown editors do is for inline (`blahblah`) they just use <code>blahblah</code>
tabs and for multi-line (```blahblah```), they use <pre><code>blahblah</code></pre>
tags. This enables styling like width: 100%
when we have both <pre>
and <code>
.
This is what I'm shooting for:
This is what Commento is now in the demo (changed colors to make it more clear):
Another related change:
Usually in other editors,
\```
blahblah
adsfasdf
\```
doesn't have an extra spaced line, but they do in the Commento editor. (See 1st screenshot)
Sometimes that first line is used to specify a language, like
\```css
.inline {
display: inline-block;
margin: 1em;
}
.wrap {
display: table;
height: 100px;
width: 160px;
padding: 10px;
border: thin solid darkgray;
}
\```
which gives the <code>
tag class: language-css
or something (GitHub uses highlight-text-html
, but Ghost uses language-javascript
but has a separate dropdown for selecting language), this lets you use Syntax highlighters like Highlight.js.
(Yet another related feature: giving us an event to know when the comments are fully loaded would be cool too, so then we can apply such styling)
This change would be awesome!
Thanks a ton!