Skip to content

Unreliable code block rendering #792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
georgeedwards opened this issue Aug 22, 2016 · 3 comments
Closed

Unreliable code block rendering #792

georgeedwards opened this issue Aug 22, 2016 · 3 comments

Comments

@georgeedwards
Copy link

georgeedwards commented Aug 22, 2016

I have two code blocks in my markdown string. This doesn't parse properly:

```bash
tns platform add ios
```

However, this one does:

```bash
cd sample-Groceries
```

These are the two results:

<code>bash
tns platform add android</code>

<pre><code class="lang-bash">cd sample-Groceries
</code></pre>

They are both in the same string, processed at the same time of the same machine...

Here you can see the whole file, markdown and html

@Feder1co5oave
Copy link
Contributor

I have no problem parsing both. Provide your complete source please.

@MohammadYounes
Copy link

I have a similar issue using v0.3.6, for example:

<h1> H1 </h1>
<h2> H2 </h2>

```html
<h1> H1 </h1>
<h2> H2 </h2>
``` 
<h1> H1 </h1>
Some content

Would produce:

<h1> H1 </h1>
<h2> H2 </h2>

<code>html
&lt;h1&gt; H1 &lt;/h1&gt;
&lt;h2&gt; H2 &lt;/h2&gt;</code>

<h1> H1 </h1>

<p>Some content</p>

But if you add a matching h2 after the code block:

<h1> H1 </h1>
<h2> H2 </h2>

```html
<h1> H1 </h1>
<h2> H2 </h2>
``` 
<h1> H1 </h1>
<h2> H2 </h2>

Some content

The problem goes away and you'll get a correct code block:

<p><h1> H1 </h1></p>
<h2> H2 </h2>

<pre><code class="lang-html">&lt;h1&gt; H1 &lt;/h1&gt;
&lt;h2&gt; H2 &lt;/h2&gt;
</code></pre>
<p><h1> H1 </h1></p>
<h2> H2 </h2>

<p>Some content</p>

https://runkit.com/5834c46bd8fb6400141ac375/58c98b8b927973001429a666

@joshbruce
Copy link
Member

#983

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants