Skip to content

Commit f2b1b26

Browse files
committed
update
1 parent 29d2e34 commit f2b1b26

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

packages/rehype-code-hook-img/src/types.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,20 @@ export type BasePluginOptions = {
6363

6464
export type Scheme = "class" | "media";
6565

66-
export type Tag = "img" | "iframe" | "embed" | "object";
66+
export type Tag =
67+
| "img"
68+
/**
69+
* experimental https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Structuring_content/General_embedding_technologies
70+
*/
71+
| "iframe"
72+
/**
73+
* experimental https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed
74+
*/
75+
| "embed"
76+
/**
77+
* experimental https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object
78+
*/
79+
| "object";
6780

6881
export type Strategy =
6982
/**

packages/rehype-code-hook-img/src/utils.ts

-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ function iframe({ svg, url, alt, width, height, ...rest }: ImgOptions) {
8383
});
8484
}
8585

86-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed
8786
function embed({ svg, url, alt, ...rest }: ImgOptions) {
8887
return h("embed", {
8988
src: url ?? svgToMiniDataURI(svg!),
@@ -104,7 +103,6 @@ function object({ svg, url, alt, ...rest }: ImgOptions) {
104103
});
105104
}
106105

107-
// https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Structuring_content/General_embedding_technologies
108106
function imgLike(tag: Tag | undefined, opts: ImgOptions) {
109107
switch (tag) {
110108
case "iframe":

0 commit comments

Comments
 (0)