Repository: arve0/markdown-it-attrs (js)

Issue:
= in attribute value are removed
When including an `=` in the value of an attribute, the `=` is parsed out. Different escaping mechanisms were ignored (`link='...'` and `\=`).

Example input:
```md
**Bold Link** {link=/some/page/in/app/id=1}
```

Current output:
```html
<p link="/some/page/in/app/id1"><strong>Bold Link</strong></p>
```

Expected output:
```html
<p link="/some/page/in/app/id=1"><strong>Bold Link</strong></p>
```


Pull request:
allow = in values
fixes #70 

Patch:
diff --git a/utils.js b/utils.js
index f0ba535..a210f24 100644
--- a/utils.js
+++ b/utils.js
@@ -30,7 +30,7 @@ exports.getAttrs = function (str, start, options) {
     let char_ = str.charAt(i);
 
     // switch to reading value if equal sign
-    if (char_ === keySeparator) {
+    if (char_ === keySeparator && parsingKey) {
       parsingKey = false;
       continue;
     }


Test patch:
diff --git a/test.js b/test.js
index e881964..8505dbb 100644
--- a/test.js
+++ b/test.js
@@ -30,6 +30,13 @@ function describeTestsWithOptions(options, postText) {
       let res = utils.getAttrs(replaceDelimiters(src, options), 0, options);
       assert.deepEqual(res, expected);
     });
+
+    it(replaceDelimiters('should parse attributes with = {attr=/id=1}', options), () => {
+      let src = '{link=/some/page/in/app/id=1}';
+      let expected = [['link', '/some/page/in/app/id=1']];
+      let res = utils.getAttrs(replaceDelimiters(src, options), 0, options);
+      assert.deepEqual(res, expected);
+    });
   });
 
   describe('markdown-it-attrs' + postText, () => {