React-markdown: backtick marked string linebreak parse inssue

Created on 29 Jun 2017  路  3Comments  路  Source: remarkjs/react-markdown

const source = `### this is a title
 this is a paragraph`
<ReactMarkdown source={source} />

this will output

this is a title

this is a paragraph

Most helpful comment

This is because the paragraph inside the template literals is indented. In markdown, leading whitespace means code.

All 3 comments

Don't understand what the problem is?

If I paste

### this is a title
this is a paragraph

into http://rexxars.github.io/react-markdown/

It renders just like it is supposed to - H3, paragraph. What are you expecting?

Hi @rexxars , I got the problem when using the backtick template literals in ES6 as shown in the code part, the H3 title output is OK, but the paragraph after the breakline is automatically wrapped in code block for some reason, for which I'm expecting normal text

This is because the paragraph inside the template literals is indented. In markdown, leading whitespace means code.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

guilhermecastro-hotmart picture guilhermecastro-hotmart  路  3Comments

dbuchet picture dbuchet  路  3Comments

kennetpostigo picture kennetpostigo  路  4Comments

hiteshpatwari picture hiteshpatwari  路  3Comments

AlexLerman picture AlexLerman  路  3Comments