@tryghost/mg-substack 0.8.5 → 0.8.6

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.
Files changed (2) hide show
  1. package/lib/process.js +7 -2
  2. package/package.json +5 -5
package/lib/process.js CHANGED
@@ -640,7 +640,7 @@ const processContent = (post, siteUrl, options) => {
640
640
 
641
641
  // Replace any signup forms with a Portal signup button
642
642
  if (options.subscribeLink) {
643
- $html('.subscription-widget-wrap').each((i, div) => {
643
+ $html('.subscription-widget-wrap, .subscription-widget-wrap-editor').each((i, div) => {
644
644
  const hasForm = $(div).find('form');
645
645
 
646
646
  if (hasForm.length) {
@@ -697,7 +697,12 @@ const processContent = (post, siteUrl, options) => {
697
697
  let $script = $('<script async="" src="//www.instagram.com/embed.js"></script>');
698
698
  let $figure = $('<figure class="instagram"></figure>');
699
699
 
700
- $iframe.attr('src', `${src}embed/captioned/`);
700
+ // Trim the trailing slash from src if it exists
701
+ if (src.endsWith('/')) {
702
+ src = src.slice(0, -1);
703
+ }
704
+
705
+ $iframe.attr('src', `${src}/embed/captioned/`);
701
706
  $figure.append($iframe);
702
707
  $figure.append($script);
703
708
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/mg-substack",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-substack",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -27,15 +27,15 @@
27
27
  "dependencies": {
28
28
  "@tryghost/debug": "0.1.35",
29
29
  "@tryghost/errors": "1.3.8",
30
- "@tryghost/kg-default-cards": "10.1.5",
31
- "@tryghost/mg-fs-utils": "0.16.1",
30
+ "@tryghost/kg-default-cards": "10.2.0",
31
+ "@tryghost/mg-fs-utils": "0.16.2",
32
32
  "@tryghost/string": "0.2.17",
33
33
  "cheerio": "1.0.0-rc.12",
34
34
  "he": "1.2.0",
35
35
  "html-entities": "2.6.0",
36
36
  "lodash": "4.17.21",
37
37
  "simple-dom": "1.4.0",
38
- "srcset": "5.0.1"
38
+ "srcset": "5.0.2"
39
39
  },
40
- "gitHead": "614571603585add8915fc853d0081208c2382a44"
40
+ "gitHead": "93b72e5f4374d9f097876b71e78fdc920af364ff"
41
41
  }