@tryghost/mg-shortcodes 0.2.16 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Shortcodes.js CHANGED
@@ -19,7 +19,7 @@ export default class Shortcodes {
19
19
  }
20
20
 
21
21
  unwrapFromQuotes(string = '') {
22
- const chars = ['’', '”', '“', '‘', '"', '"'];
22
+ const chars = ['’', '”', '“', '‘', '"', '"', '”', '″'];
23
23
  const quoteRegExp = new RegExp(`^(${chars.join('|')})|(${chars.join('|')})$`, 'gm');
24
24
  return string.replace(quoteRegExp, '');
25
25
  }
@@ -38,6 +38,9 @@ export default class Shortcodes {
38
38
  // Quoted key="value" pairs
39
39
  theKey = item[1];
40
40
  theValue = this.typeCast(item[2]);
41
+ } else if (item[3] && item[4] !== 'undefined') {
42
+ theKey = item[3];
43
+ theValue = this.typeCast(item[4]);
41
44
  } else if (item[5] && item[6] !== 'undefined') {
42
45
  // Unquoted key=value pairs
43
46
  theKey = item[5];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/mg-shortcodes",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-shortcodes",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -20,9 +20,9 @@
20
20
  "access": "public"
21
21
  },
22
22
  "devDependencies": {
23
- "eslint": "8.56.0",
23
+ "eslint": "8.57.0",
24
24
  "jest": "29.7.0",
25
25
  "jest-extended": "4.0.2"
26
26
  },
27
- "gitHead": "eff0d7d7ba1a0ce1d89dd15a0671b23ea4ef9307"
27
+ "gitHead": "6d66ced5547ace4095b32d0662b158b119a44fa9"
28
28
  }