question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support fenced code block in list.

See original GitHub issue

It would be great if we can do something like this:

  • A list item with some code sample

    console.log('hello, world.');
    

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
minwecommented, Apr 11, 2016

How about this?

2016-04-11 5 02 55

Code blocks nested in blockquote are not rendered correctly. It should be a <pre><code>...</code></pre>, but in Ghost got just <code>

Take below as example:

> Note:
>
> Some code in blockquote.
>
> ```javascript
> function() {
>   consoel.log('hello world!');
> }
> ```

This block is rendered to:

<blockquote>
  <p>Note:</p>

  <p>Some code in blockquote.</p>

  <p><code>javascript
  function() {
    consoel.log('hello world!');
  }
  </code></p>
</blockquote>

The correct result should be:

<blockquote>
  <p>Note:</p>

  <p>Some code in blockquote.</p>

<pre><code class="javascript language-javascript">function() {
  consoel.log('hello world!');
}</code></pre>
</blockquote>

The official demo of Showdown works well.

2016-04-11 5 11 59

Marked works well, too.

So why do not use the official version of Showdown, the Ghost fork is out of date and bugly.

0reactions
dravenesscommented, Nov 10, 2016

When will fenced code block be supported in Ghost? Have been waiting for this for a long long time

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating and highlighting code blocks - GitHub Docs
You can create fenced code blocks by placing triple backticks ``` before and after the code block. We recommend placing a blank line...
Read more >
Fenced Code Blocks — Python-Markdown 3.4.1 documentation
Fenced Code Blocks are only supported at the document root level. Therefore, they cannot be nested inside lists or blockquotes. If you need...
Read more >
Where is the list of language names supported by the ...
Where is the list of language names supported by the markdown fenced code blocks? Is makefile one of them? Perhaps it is called...
Read more >
Code Blocks
We offer both classic single code blocks, as well as a tabbed interface for displaying multiple code blocks concisely! These are written nearly...
Read more >
Extended Syntax - Markdown Guide
Many Markdown processors support syntax highlighting for fenced code blocks. This feature allows you to add color highlighting for whatever language your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found