use monospace + pre in usercss parsing warning

This commit is contained in:
tophf 2018-07-04 19:25:03 +03:00
parent 766a38e9e8
commit 561e7c585b
2 changed files with 2 additions and 1 deletions

View File

@ -85,6 +85,7 @@ input:disabled + span {
overflow-wrap: break-word; overflow-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
margin: 1ex 0 0; margin: 1ex 0 0;
font-family: monospace;
font-weight: normal; font-weight: normal;
font-size: 80%; font-size: 80%;
} }

View File

@ -230,7 +230,7 @@
function buildWarning(err) { function buildWarning(err) {
const contents = Array.isArray(err) ? const contents = Array.isArray(err) ?
[$create('pre', err.join('\n'))] : [$create('pre', err.join('\n'))] :
[err && err.message || err || 'Unknown error']; [err && err.message && $create('pre', err.message) || err || 'Unknown error'];
if (Number.isInteger(err.index)) { if (Number.isInteger(err.index)) {
const pos = cm.posFromIndex(err.index); const pos = cm.posFromIndex(err.index);
contents[0] = `${pos.line + 1}:${pos.ch + 1} ` + contents[0]; contents[0] = `${pos.line + 1}:${pos.ch + 1} ` + contents[0];