From 3299b50b6073199d50d6f1296eeda49675daaef1 Mon Sep 17 00:00:00 2001 From: wb-ty426248 Date: Tue, 18 Dec 2018 17:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=80=9F=E9=89=B4=E7=90=86=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/blink.js | 2 +- lib/capture.js | 1 + lib/capture_breakword.js | 2 ++ lib/quantified_group.js | 1 + lib/quotes.js | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/blink.js b/lib/blink.js index c391a9f..29735ed 100644 --- a/lib/blink.js +++ b/lib/blink.js @@ -3,5 +3,5 @@ var marked = require('marked') module.exports = function (str) { var md = marked(str) // TODO - return null + return md.replace(/@@(.*?)@@/g, "$1") } \ No newline at end of file diff --git a/lib/capture.js b/lib/capture.js index a08ee57..2356719 100644 --- a/lib/capture.js +++ b/lib/capture.js @@ -1,3 +1,4 @@ module.exports = function (str) { // TODO + return str.match((/\d+/g)) } \ No newline at end of file diff --git a/lib/capture_breakword.js b/lib/capture_breakword.js index a08ee57..a266aeb 100644 --- a/lib/capture_breakword.js +++ b/lib/capture_breakword.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TODO + let reg = str.match(/\bx=(\d+)\b/) + return reg ? reg[1] : null } \ No newline at end of file diff --git a/lib/quantified_group.js b/lib/quantified_group.js index a08ee57..c6c2efb 100644 --- a/lib/quantified_group.js +++ b/lib/quantified_group.js @@ -1,3 +1,4 @@ module.exports = function (str) { // TODO + return /^((0x[a-fA-F\d]{2})\s+){8}$/.test(str) } \ No newline at end of file diff --git a/lib/quotes.js b/lib/quotes.js index a08ee57..b82e775 100644 --- a/lib/quotes.js +++ b/lib/quotes.js @@ -1,3 +1,4 @@ module.exports = function (str) { // TODO + return str.match(/".*?"/g) } \ No newline at end of file