Skip to content

Commit 4944b22

Browse files
committed
Indent slide code in order to offset from surrounding text
1 parent 6f36fb4 commit 4944b22

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/node_modules/@stdlib/repl/presentation/lib/parse_slide.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ var emoji = require( './emoji.js' );
3333
var FRAGMENT_SEP = '--';
3434
var NOTES_SEP = '~~~';
3535
var RE_CODE_DELIMITER = /^```\s*([a-z]+)?$/;
36+
var CODE_INDENTATION = ' ';
3637

3738
// Hash for normalizing code block languages:
3839
var LANGS = {
@@ -121,6 +122,7 @@ function parseSlide( text ) {
121122
}
122123
if ( CODE_BLOCK ) {
123124
out.code[ out.code.length-1 ].src.push( line );
125+
line = CODE_INDENTATION + line;
124126

125127
// TODO: apply syntax highlighting
126128
}

0 commit comments

Comments
 (0)