Skip to content

Commit

Permalink
fix: convert hidePostCaption from insta embed code (#1780)
Browse files Browse the repository at this point in the history
Add support for setting the `hidePostCaption` attribute from
the instagram embed code in the source-html converter
  • Loading branch information
bachbui committed Jul 12, 2024
1 parent a3e57b3 commit 8925544
Show file tree
Hide file tree
Showing 2 changed files with 227 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/@atjson/source-html/src/converter/social-embeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ export default function (doc: Document) {
attributes: {
...attributes,
content: content.id,
hidePostCaption:
blockquote.attributes.dataset["instgrm-captioned"] != null &&
blockquote.attributes.dataset["instgrm-captioned"] !== "false"
? undefined
: true,
},
}),
content,
Expand Down
Loading

0 comments on commit 8925544

Please sign in to comment.