让简介内可以打空格
This commit is contained in:
parent
b766b94ee7
commit
cd168278e9
|
@ -525,6 +525,7 @@ function cardN(id){
|
|||
function descriptionToHTML(str)
|
||||
{
|
||||
str = str.replace(/\n/ig,"<br>"); //换行
|
||||
str = str.replace(/ /ig," "); //换行
|
||||
str = str.replace(/\^([a-fA-F0-9]+?)\^([^\^]+?)\^p/igm,'<span style="color:#$1;">$2</span>'); //文字颜色
|
||||
str = str.replace(/\%\{m([0-9]{1,4})\}/g,function (str, p1, offset, s){return cardN(parseInt(p1,10)).outerHTML;}); //怪物头像
|
||||
return str;
|
||||
|
|
Loading…
Reference in New Issue