Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Markdown code blocks are not rendered with newlines #276
Comments
jrwren
commented
May 24, 2016
|
Also, sometimes the blocks are rendered with the ``` being displayed. https://jujucharms.com/u/evarlast/parse-server/trusty/0 See the Using it section. |
chuckbutler
commented
May 24, 2016
|
Linking this with #228 as we've had some issues with the markdown parser, and I still feel that GFMD would solve a lot of these issues (its territory well traveled) |
arosales
commented
Jun 6, 2016
•
|
We are seeing this in a few places now, any ideas on how we can fix this? -thanks, |
anthonydillon
self-assigned this
Jun 7, 2016
|
Our supported markdown syntax for code blocks and code are as follows. To produce a code block, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:
Will generate: <p>This is a normal paragraph:</p>
<pre><code>This is a code block.
</code></pre> To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:
Will produce this: <p><code>There is a literal backtick (`) here.</code></p>The code blocks need to be wrapped in a |
mbruzek
commented
Jun 7, 2016
•
|
Thanks @anthonydillon for comment. I think we must respect new lines with in the multiple backtick blocks. The reason I opened this bug is because I believe the Canonical process is not displaying/rendering the markdown correctly. File rendered on the Charm Store: In the README.md I expected to see the different commands on their own line and they have all newlines (view source here) removed because this is what I saw on Markdown preview tools when I was writing the file. The three backticks allow authors to specify which language the code block is, so syntax highlighting works better for many cases where we want to display code. I can fix my README.md to the other code block style, but the charm store has many different authors who may have used the three backtick method (which is completely valid in markdown). We must display these blocks as the authors expected, and can not ask them to re-write their files using the other block style. |
mbruzek
commented
Jun 7, 2016
|
I believe the way we render this will be a problem for anyone who puts code in the three backtick code blocks. Example: https://gist.github.com/anonymous/f98f024db6e9bab0732bb705e2a630db |
ryan-beisner
commented
Jun 7, 2016
|
We have README.md files which render correctly on github, but squash newlines within the triple backtick code blocks on the charm store. Is there an ETA for resolving this, or should we be updating mds in a special way so that the cham store will also render them as expected? |
frankban
added
the
bug
label
Jun 10, 2016
frankban
added this to the next milestone
Jun 10, 2016
anthonydillon
removed their assignment
Sep 17, 2016
anthonydillon
assigned
fabricematrat
Sep 27, 2016
|
This is done, we now support github markdown extensions. |
frankban
closed this
Mar 3, 2017
ryan-beisner
commented
Mar 3, 2017
|
Woot, thanks |


mbruzek commentedMay 23, 2016
•
Edited 1 time
-
mbruzek
May 23, 2016
In my published charm (https://jujucharms.com/u/mbruzek/kubernetes/trusty/5) the README is not getting rendered correctly on the Charm Store.
The readme markdown starts and ends a code a block with three backticks:
This block gets rendered without any newlines as:
juju deploy trusty/etcd juju deploy local:trusty/kubernetes juju add-relation kubernetes etcdWe should preserve the newlines in code blocks or I suspect you will have many other people finding this a problem.