From 675fcc51d66d918607537702b2c9083b81a8d30a Mon Sep 17 00:00:00 2001 From: CROTEL Date: Tue, 17 Mar 2020 20:35:22 +0800 Subject: [PATCH] debug --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 91c931f..f2946c7 100644 --- a/main.js +++ b/main.js @@ -27,11 +27,12 @@ return [year, month, day].join('-'); } var publishTime = formatDate(json.posts[i].published_at); + var filterUrl = /((www\.)?[a-zA-Z0-9_]{1,}(\-)?[a-zA-Z0-9_]{1,}\.[a-z]{2,}\b([a-zA-Z0-9@:%_\+.~#?&//=]*)|(www\.)?[a-zA-Z0-9_]{1,}\.[a-z]{2,}\b([a-zA-Z0-9@:%_\+.~#?&//=]*))/g; var preRLB1 = json.posts[i].plaintext.replace(/\?+\?/g, ''); var preRLB2 = preRLB1.replace(/\++\+/g, ''); var preRLB3 = preRLB2.replace(/\!+\!/g, ''); var replaceLineBreak = preRLB3.replace(/\n+\n/g, '

'); - var getTitleUrl = new RegExp(/((www\.)?[a-zA-Z0-9_]{1,}(\-)?[a-zA-Z0-9_]{1,}\.[a-z]{2,}\b([a-zA-Z0-9@:%_\+.~#?&//=]*)|(www\.)?[a-zA-Z0-9_]{1,}\.[a-z]{2,}\b([a-zA-Z0-9@:%_\+.~#?&//=]*))/g); + var getTitleUrl = new RegExp(filterUrl); var plaintext, titleUrl; function gUrl(){ var r = replaceLineBreak