Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github markdown that respects newlines

I've got a txt file with a list that looks like this

# Actors
Robert Mitchum
John Voight

# Musicians
Geddy Lee
Angus Young

I would like to add that text to a Github Wiki page, and make it render like this: (one line of text for each line of text in my txt-file)

enter image description here

But by default, github's flavor of markdown will render it like this

enter image description here

Is there any of the predefined edit modes in Github which could achieve this? Here's the list of the edit modes available

enter image description here

I like markdown overall, I just need a format that respects line breaks. Would prefer to continue using something with the same symbols as markdown. (But I basically only need # symbols for headers) However I could switch to a completely different style if I had to. (search-and-replacing my hashtags to other symbols would be easy) I just want a format that respects newlines and has some basic formatting for headers.

like image 293
Drkawashima Avatar asked Jun 26 '18 18:06

Drkawashima


People also ask

How do you insert a line break in Markdown?

Line Breaks To create a line break or new line ( <br> ), end a line with two or more spaces, and then type return.

Does GitHub Markdown support color?

On the app, I have selected GitHub Flavored in the Markdown options. According to GitHub, colors are allowed. I created a small text file as a test. I will show the code and how I expect it to look in the graphic below.

Does GitHub Markdown support HTML?

You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

What GitHub flavored markdown is and how it is used?

GitHub Flavored Markdown, often shortened as GFM, is the dialect of Markdown that is currently supported for user content on GitHub.com and GitHub Enterprise. This formal specification, based on the CommonMark Spec, defines the syntax and semantics of this dialect. GFM is a strict superset of CommonMark.


1 Answers

Add 2 spaces at the end of line :
Like that :

# Actors
Robert Mitchum  
John Voight  

Actors

Robert Mitchum
John Voight

Musicians

Geddy Lee
Angus Young

like image 92
Tinmarino Avatar answered Oct 07 '22 01:10

Tinmarino