From 7c181aa90d7a61488f8fd66183a31cd5cfcf622b Mon Sep 17 00:00:00 2001 From: TJ Kohli Date: Mon, 20 Jun 2022 11:10:47 -0400 Subject: [PATCH 1/2] Fixed iframe embed --- lib/kramdown/converter/prismic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kramdown/converter/prismic.rb b/lib/kramdown/converter/prismic.rb index f4cb0c3..d68dd75 100644 --- a/lib/kramdown/converter/prismic.rb +++ b/lib/kramdown/converter/prismic.rb @@ -179,7 +179,7 @@ def convert_html_element(element) }, type: 'embed', data: { - embed_url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', + embed_url: element.attr['src'], type: 'link' } } From 376344a34e025678c5e579aed0d95b3b68af428f Mon Sep 17 00:00:00 2001 From: TJ Kohli Date: Mon, 20 Jun 2022 11:52:10 -0400 Subject: [PATCH 2/2] Changed incorrect type for video embed --- lib/kramdown/converter/prismic.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/kramdown/converter/prismic.rb b/lib/kramdown/converter/prismic.rb index d68dd75..2426cd9 100644 --- a/lib/kramdown/converter/prismic.rb +++ b/lib/kramdown/converter/prismic.rb @@ -173,14 +173,14 @@ def convert_sub_html_element(element, type) def convert_html_element(element) if element.value == 'iframe' { - content: { - spans: [], - text: '' - }, type: 'embed', data: { embed_url: element.attr['src'], - type: 'link' + type: 'video' + }, + content: { + spans: [], + text: '' } } else