@tryghost/mg-shortcodes 0.2.17 → 0.2.19

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2013-2023 Ghost Foundation
3
+ Copyright (c) 2013-2025 Ghost Foundation
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -65,4 +65,4 @@ Follow the instructions for the top-level repo.
65
65
 
66
66
  # Copyright & License
67
67
 
68
- Copyright (c) 2013-2023 Ghost Foundation - Released under the [MIT license](LICENSE).
68
+ Copyright (c) 2013-2025 Ghost Foundation - Released under the [MIT license](LICENSE).
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.17",
3
+ "version": "0.2.19",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-shortcodes",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -24,5 +24,5 @@
24
24
  "jest": "29.7.0",
25
25
  "jest-extended": "4.0.2"
26
26
  },
27
- "gitHead": "11cc97db15efc3e19af16253cd53694cf72aa55d"
27
+ "gitHead": "fd2fdb1542c90de5caac0feaa76e8ea599ef202f"
28
28
  }