azu / gitbook-plugin-include-codeblock

GitBook plugin for including file
Other
40 stars 25 forks source link

Generates an invalid code block when code has an empty line #3

Closed vzvu3k6k closed 8 years ago

vzvu3k6k commented 8 years ago

Let fixture/test.js has the following content:

console.log("foo");

console.log("bar");

This plugin will expand [import](fixtures/test.js) into:

> [test.js](fixtures/test.js)
```js
console.log("foo");

console.log("bar");

Gitbook renders it as:

`````` html
<blockquote>
<p><a href="fixtures/test.js">test.js</a>
```js
console.log(&quot;foo&quot;);</p>
</blockquote>
<p>console.log(&quot;bar&quot;);</p>
<pre><code>

These pages are affected by this issue:

azu commented 8 years ago

@vzvu3k6k Thanks for report. This isssue was fixed in #4

vzvu3k6k commented 8 years ago

:+1: