Markdown no newlines in codeblock
See original GitHub issueNo matter what I try I cannot seem to get code blocks to show newlines. Additionally, it only seems possible to specify newlines in OSF’s markdown renderer in general by adding 2 spaces to the end of a line, but even that doesn’t work inside codeblocks.
The block displays fine of course if it contains no newlines. However something like this:
```
line 1
line 2
```
Will show up as:
line 1 line 2
I’ve tried searching for different types of markdown syntax and trying just about every variant I can think of, and the block simply will not display newlines.
I can work around the issue by just making every single line of code its own block and adding 2 spaces to the end of each to achieve a newline, but this is rather tedious and looks very ugly.
If this is by design is there any chance it could be changed? There is already a feature for single line blocks using single quotes. In markdown triple quotes is supposed to be reserved for blocks that might contain newlines.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top GitHub Comments
Hello, sorry for the confusion. Here a link to the specific Doc.
In short, indent each line of the block by four spaces.
Ok that simple file works, and after trying a few other things I think the issue is preceding the block by a bulleted line, or a non-bulleted line that is itself preceded by one.
For example, this doesn’t work:
But:
and also, strangely enough: