don't break line

pull/1/head
yann300 7 years ago
parent 7fee01d0c7
commit 3892acb675
  1. 5
      src/app/panels/terminal.js

@ -508,7 +508,6 @@ class Terminal {
}, 0) }, 0)
} }
_blocksRenderer (mode) { _blocksRenderer (mode) {
var self = this
mode = { log: 'black', info: 'blue', error: 'red' }[mode] // defaults mode = { log: 'black', info: 'blue', error: 'red' }[mode] // defaults
if (mode) { if (mode) {
return function logger (args, scopedCommands, append) { return function logger (args, scopedCommands, append) {
@ -516,9 +515,7 @@ class Terminal {
var values = javascriptserialize.apply(null, args).map(function (val, idx) { var values = javascriptserialize.apply(null, args).map(function (val, idx) {
if (typeof args[idx] === 'string') val = args[idx] if (typeof args[idx] === 'string') val = args[idx]
if (types[idx] === 'element') val = jsbeautify.html(val) if (types[idx] === 'element') val = jsbeautify.html(val)
var pattern = '.{1,' + self.data.lineLength + '}' return val
var lines = val.match(new RegExp(pattern, 'g'))
return lines.map(str => document.createTextNode(`${str}\n`))
}) })
append(yo`<span style="color: ${mode};">${values}</span>`) append(yo`<span style="color: ${mode};">${values}</span>`)
} }

Loading…
Cancel
Save