From 246acd5dad2ee52c2df44622cdaeedf76165ea49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Mon, 21 Dec 2020 15:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E7=94=A8HTML=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E8=80=8C=E6=98=AF=E4=BB=A5CSS=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-universal_function.js | 2 +- style.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/script-universal_function.js b/script-universal_function.js index f0d9f022..a3336f17 100644 --- a/script-universal_function.js +++ b/script-universal_function.js @@ -525,7 +525,7 @@ function cardN(id){ function descriptionToHTML(str) { str = str.replace(/\n/ig,"
"); //换行 - str = str.replace(/ /ig," "); //换行 + //str = str.replace(/ /ig," "); //换行 str = str.replace(/\^([a-fA-F0-9]+?)\^([^\^]+?)\^p/igm,'$2'); //文字颜色 str = str.replace(/\%\{m([0-9]{1,4})\}/g,function (str, p1, offset, s){return cardN(parseInt(p1,10)).outerHTML;}); //怪物头像 return str; diff --git a/style.css b/style.css index 83da16f2..0a6612c4 100644 --- a/style.css +++ b/style.css @@ -79,6 +79,7 @@ body{ box-sizing: border-box; padding: 1px; margin: 0; + white-space: pre-wrap; } .guide-mod .control-box>div.status