Skip to content

Commit

Permalink
don't break into line on paste if code have newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jun 18, 2020
1 parent ae09fa0 commit e21603b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/terminal.js
Expand Up @@ -139,7 +139,10 @@ function terminal({selector, lips, dynamic = false, name = 'terminal'}, undefine
var prompt = this.get_prompt();
try {
var formatter = new lips.Formatter(code);
var output = formatter.break().format({
if (!code.match(/\n/)) {
formatter.break();
}
var output = formatter.format({
offset: prompt.length
});
} catch(e) {
Expand Down

0 comments on commit e21603b

Please sign in to comment.