From 561e7c585bcb1b938aa7611c400f7b3c6fe3d217 Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 4 Jul 2018 19:25:03 +0300 Subject: [PATCH] use monospace + pre in usercss parsing warning --- install-usercss/install-usercss.css | 1 + install-usercss/install-usercss.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/install-usercss/install-usercss.css b/install-usercss/install-usercss.css index 1e0cdfef..0f1e2970 100644 --- a/install-usercss/install-usercss.css +++ b/install-usercss/install-usercss.css @@ -85,6 +85,7 @@ input:disabled + span { overflow-wrap: break-word; white-space: pre-wrap; margin: 1ex 0 0; + font-family: monospace; font-weight: normal; font-size: 80%; } diff --git a/install-usercss/install-usercss.js b/install-usercss/install-usercss.js index 2e1c3a36..e1f93e49 100644 --- a/install-usercss/install-usercss.js +++ b/install-usercss/install-usercss.js @@ -230,7 +230,7 @@ function buildWarning(err) { const contents = Array.isArray(err) ? [$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)) { const pos = cm.posFromIndex(err.index); contents[0] = `${pos.line + 1}:${pos.ch + 1} ` + contents[0];