Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to wrap long lines inside of markdown ``` code ``` in Github and Gitlab issues?

eg:

``` some very long line; some very long line; some very long line; some very long line; some very long line; some very long line; some very long line; some very long line; some very long line; some very long line;  ``` 

will force user to scroll in github/gitlab issues. Is there a way to soft-line wrap inside code block ?

I've read the related questions but they seem different (eg jekyll etc).

EDIT: manually editing code to limit to 80 columns is not a viable option (eg, when pasting from a compiler output/log etc; that's a lot of work and should not be necessary)

EDIT: see also https://github.com/softvar/enhanced-github/issues/95

like image 404
timotheecour Avatar asked Dec 20 '16 08:12

timotheecour


People also ask

How do you insert a line space in Markdown?

Blank Lines To add a single extra line after a paragraph, add two extra spaces at the end of the text. To add an extra line of space between paragraphs, add the HTML   code, followed by two extra spaces (e.g. &nbsp.. , replacing the periods with spaces).

How do I leave a line in Markdown?

There are multiple ways to add a blank line in markdown content in bitbucket issues or comments. First way, using <br> html tag inside markdown content. Second way, use two spaces with entering or enter keystroke in markdown content adds link break. The third way, use a hyphen( - ) in markdown content.

How do I add lines to a readme in github?

If you want a blank line, you insert one blank line — or more, if you want bigger blank space — in between two lines of text. ###### This is as small as it gets before regular text.

How do I embed code in Markdown?

There are two ways to format code in Markdown. You can either use inline code, by putting backticks (`) around parts of a line, or you can use a code block, which some renderers will apply syntax highlighting to.


1 Answers

A quick workaround is to quote your codeblocks, e.g.

this line is very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long

Make sure you keep the three backticks inline with the very long line. Like this:

> ```this line is very long``` 
like image 83
Dan Keezer Avatar answered Oct 20 '22 03:10

Dan Keezer