From b1924bac1c1f88216f04208b1edc1acbe39d1331 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 23 Jun 2020 08:54:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20potentially=20squashed?= =?UTF-8?q?=20images=20in=20image=20cards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no issue - 3.21.0 added `width/height` attributes to `` elements output by image cards which was a potentially breaking change for any sites whose CSS does not expect those attributes, resulting in squashed and distorted images - updated to `@tryghost/kg-default-cards` which modifies the image card renderer to not output `width/height` attributes --- package.json | 2 +- test/unit/lib/mobiledoc_spec.js | 4 ++-- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 4b92ec5241..ca66159b9c 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@tryghost/image-transform": "0.2.4", "@tryghost/kg-card-factory": "2.1.1", "@tryghost/kg-default-atoms": "2.0.1", - "@tryghost/kg-default-cards": "2.3.1", + "@tryghost/kg-default-cards": "2.3.2", "@tryghost/kg-markdown-html-renderer": "2.0.1", "@tryghost/kg-mobiledoc-html-renderer": "3.0.1", "@tryghost/magic-link": "0.4.9", diff --git a/test/unit/lib/mobiledoc_spec.js b/test/unit/lib/mobiledoc_spec.js index 51253605a2..eab154bed9 100644 --- a/test/unit/lib/mobiledoc_spec.js +++ b/test/unit/lib/mobiledoc_spec.js @@ -76,7 +76,7 @@ describe('lib/mobiledoc', function () { }; mobiledocLib.mobiledocHtmlRenderer.render(mobiledoc) - .should.eql('

One
Two

Markdown card

\n

Some markdown

\n

Three


Birdies

Four

HTML card

\n

Some HTML

Embed card

'); + .should.eql('

One
Two

Markdown card

\n

Some markdown

\n

Three


Birdies

Four

HTML card

\n

Some HTML

Embed card

'); }); it('respects srcsets config', function () { @@ -111,7 +111,7 @@ describe('lib/mobiledoc', function () { }; mobiledocLib.mobiledocHtmlRenderer.render(mobiledoc) - .should.eql('
Birdies
'); + .should.eql('
Birdies
'); }); }); diff --git a/yarn.lock b/yarn.lock index 68019f78b9..d2cd66be4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -443,10 +443,10 @@ resolved "https://registry.yarnpkg.com/@tryghost/kg-default-atoms/-/kg-default-atoms-2.0.1.tgz#3223ef5210d73af02c53795e5a5f1a9c5fc5bd92" integrity sha512-0/Fx98ZIj/gyPglKg9HQP+cKPSBpbue1pnzh3E8hR4WXzqnSWMFA8VTUyMeI+8oNwxkxhZrWt5KifngHbBfw2A== -"@tryghost/kg-default-cards@2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@tryghost/kg-default-cards/-/kg-default-cards-2.3.1.tgz#d3eb1f180cab7a56433f17e603e00fa2fc105366" - integrity sha512-k5wJvWr2Xx6NOdSiaPmTihLCo7QJCvzFLe2kEskc4fn9u/YzZWQCQfmJVKNrsQ7MG8V06z8uOcXBUsQY3/4uGQ== +"@tryghost/kg-default-cards@2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@tryghost/kg-default-cards/-/kg-default-cards-2.3.2.tgz#247c9b472742467d4d624f5070f71c36ecacb07a" + integrity sha512-gYROUJJMoUUFPjY56YWHn9I/akKwEg51HrBkeyHaXC4xEyAuDwpMdRtToVObSJCoAPjs9nB+TifHYZGk32aeWg== dependencies: "@tryghost/kg-markdown-html-renderer" "^2.0.1" "@tryghost/url-utils" "^0.6.14"