Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Commit

Permalink
Make pre tag support code
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyguitar committed Sep 2, 2016
1 parent e88b1d6 commit c544ff2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ TerminalRenderer.prototype.blockquote = function(quoteBlocks) {
});
};

TerminalRenderer.prototype.html = function(html) {
return this.o.html(setLineSameWidth(html
.replace(/.*<pre>\s```.*/g, '```')
.replace(/.*```\s<\/pre>.*/g,'```')));
};



/**
* Read slide content.
Expand Down
2 changes: 2 additions & 0 deletions slides/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ become

Markdown

<pre>
```
var str = "Hello noslide.js!!! (>////<)"

Expand All @@ -70,6 +71,7 @@ request('http://www.google.com', function (error, response, body) {
}
})
```
</pre>

become

Expand Down

0 comments on commit c544ff2

Please sign in to comment.