From 410a4712ee0ebb25682b9c85e2c4f63fbd87993a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 13 Jan 2024 17:15:24 -0400 Subject: content: flatten .square-content into .image-outer-area --- src/content/dependencies/image.js | 9 +++------ tap-snapshots/test/snapshot/image.js.test.cjs | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js index a39acca3..1582d3f4 100644 --- a/src/content/dependencies/image.js +++ b/src/content/dependencies/image.js @@ -317,13 +317,10 @@ export default { wrapped = html.tag('div', {class: 'image-outer-area'}, - wrapped); + willSquare && + {class: 'square-content'}, - if (willSquare) { - wrapped = - html.tag('div', {class: 'square-content'}, - wrapped); - } + wrapped); wrapped = html.tag('div', {class: 'image-container'}, diff --git a/tap-snapshots/test/snapshot/image.js.test.cjs b/tap-snapshots/test/snapshot/image.js.test.cjs index 5661c9c7..ddfb3e6c 100644 --- a/tap-snapshots/test/snapshot/image.js.test.cjs +++ b/tap-snapshots/test/snapshot/image.js.test.cjs @@ -25,8 +25,8 @@ exports[`test/snapshot/image.js > TAP > image (snapshot) > content warnings via ` exports[`test/snapshot/image.js > TAP > image (snapshot) > lazy with square 1`] = ` - -
+ +
` exports[`test/snapshot/image.js > TAP > image (snapshot) > link with file size 1`] = ` @@ -54,7 +54,7 @@ exports[`test/snapshot/image.js > TAP > image (snapshot) > source via src 1`] = ` exports[`test/snapshot/image.js > TAP > image (snapshot) > square 1`] = ` -
+
` exports[`test/snapshot/image.js > TAP > image (snapshot) > thumb requested but source is gif 1`] = ` -- cgit 1.3.0-6-gf8a5