Skip to content

Commit

Permalink
Merge pull request #511 from zenn-dev/fix-docswell
Browse files Browse the repository at this point in the history
Docswellスライドの表示調整
  • Loading branch information
cm-dyoshikawa authored Sep 20, 2024
2 parents 42c7d27 + cfa72e3 commit dc6f0b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Docswell', () => {
'@[docswell](https://www.docswell.com/slide/LK7J5V/embed)'
);
expect(html).toContain(
'<span class="embed-block embed-docswell"><iframe src="https://www.docswell.com/slide/LK7J5V/embed" allowfullscreen="true" width="620" style="border:1px solid #ccc;display:block;margin:0px auto;padding:0px;aspect-ratio:620/349"></iframe></span>'
'<span class="embed-block embed-docswell"><iframe src="https://www.docswell.com/slide/LK7J5V/embed" allowfullscreen="true" width="100%" style="border:1px solid #ccc;display:block;margin:0px auto;padding:0px;aspect-ratio:16/9"></iframe></span>'
);
});
});
Expand All @@ -19,7 +19,7 @@ describe('Docswell', () => {
'@[docswell](https://www.docswell.com/s/ku-suke/LK7J5V-hello-docswell)'
);
expect(html).toContain(
'<span class="embed-block embed-docswell"><iframe src="https://www.docswell.com/slide/LK7J5V/embed" allowfullscreen="true" width="620" style="border:1px solid #ccc;display:block;margin:0px auto;padding:0px;aspect-ratio:620/349"></iframe></span>'
'<span class="embed-block embed-docswell"><iframe src="https://www.docswell.com/slide/LK7J5V/embed" allowfullscreen="true" width="100%" style="border:1px solid #ccc;display:block;margin:0px auto;padding:0px;aspect-ratio:16/9"></iframe></span>'
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/zenn-markdown-html/src/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const embedGenerators: Readonly<EmbedGeneratorList> = {
if (!slideUrl) {
return errorMessage;
}
return `<span class="embed-block embed-docswell"><iframe src="${slideUrl}" allowfullscreen="true" class="docswell-iframe" width="620" height="349" style="border: 1px solid #ccc; display: block; margin: 0px auto; padding: 0px; aspect-ratio: 620/349;"></iframe></span>`;
return `<span class="embed-block embed-docswell"><iframe src="${slideUrl}" allowfullscreen="true" class="docswell-iframe" width="100%" style="border: 1px solid #ccc; display: block; margin: 0px auto; padding: 0px; aspect-ratio: 16/9"></iframe></span>`;
},
jsfiddle(str) {
if (!isJsfiddleUrl(str)) {
Expand Down

0 comments on commit dc6f0b2

Please sign in to comment.