Skip to content

Commit

Permalink
Fix issue with code examples not working after any demos
Browse files Browse the repository at this point in the history
This works around an issue where a demo embedded within the page would cause any code samples in the rest of the page to not be highlighted correctly. Prism would try to format the demo HTML as CLI code and throw an error in the process.
  • Loading branch information
chasenlehara committed May 4, 2018
1 parent 47518f3 commit a348526
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions demo_tpl.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Note that the space in the <code> </code> blocks is significant:
// without it, any demo in a page would break the rest of the code
// examples throughout the page.

module.exports = `
<ul>
<li class="tab" data-tab="demo">Demo</li>
Expand All @@ -8,9 +12,9 @@ module.exports = `
<iframe></iframe>
</div>
<div class="tab-content" data-for="html">
<pre class="line-numbers language-html"><code></code></pre>
<pre class="line-numbers language-html"><code> </code></pre>
</div>
<div class="tab-content" data-for="js">
<pre class="line-numbers language-js"><code></code></pre>
<pre class="line-numbers language-js"><code> </code></pre>
</div>
`;

0 comments on commit a348526

Please sign in to comment.