Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force line break (<br/>) in header (<h1>) in Markdown

I'm trying to create a two-line <h1> in Markdown, something along the lines of:

<h1>Title<br/>byline</h1> 

The Markdown docs say:

When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

Unfortunately, this only seems to work for paragraphs -- if I try it with an <h1> (dots · indicate spaces):

#·Title·· byline 

the trailing spaces are ignored and I just get:

<h1>Title</h1>  <p>byline</p> 

Can anyone tell me a workaround for this?

P.S. I'm using vanilla Markdown 1.0.1 from the command line.

like image 262
David Moles Avatar asked Dec 05 '12 19:12

David Moles


People also ask

How do I insert a breakdown Markdown?

When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

How do you force a line break in Markdown?

There are a few different methods to enforce a line break in the same paragraph in Markdown syntax: HTML's <br /> , backslash and double space.

How do you insert multiple line breaks in Markdown?

Multiple Lines To create a distinct block of text without formatting any of the text within the block, place triple backticks (```) on the lines before and after the block of text to be separated. Notes: Unlike the HTML <pre> tag, HTML tags or Markdown tags within the text formatted in this way will not be interpreted.


1 Answers

Turns out the answer is just "use <br/>."

# Title <br/> byline 

produces

<h1>Title <br/> byline</h1> 

** facepalm **

like image 61
David Moles Avatar answered Sep 21 '22 07:09

David Moles