aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-04-02 18:39:47 +0200
committerache <ache@ache.one>2018-04-02 18:39:47 +0200
commit6d247d30bb1ef6b694bce4798fe3fb3c38f257ed (patch)
treeb9d8c58252bd21ae430dffce3dbab1c2a9bb6ecc
parentFix an URL (diff)
delete new line regex
-rw-r--r--app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app.js b/app.js
index a904757..279b554 100644
--- a/app.js
+++ b/app.js
@@ -1,7 +1,7 @@
'use strict';
-const START = /^(\[_+)\n/g;
-const END = /\n(_+])/g;
+const START = /^(\[_+)/g;
+const END = /(_+])/g;
function locator(value, fromIndex) {
const index = value.indexOf(START, fromIndex);
@@ -172,7 +172,7 @@ function plugin() {
return eat(value.slice(0, value.search(END)) + value.match(END)[0] + eaten)({
type: 'html',
value: `<textarea${prop2HTML(prop)}>` +
- `${value.slice(value.match(START)[0].length, value.search(END))}`
+ `${value.slice(value.match(START)[0].length + 1, value.search(END) - 1)}` +
'</textarea>',
/*