@codecademy/gamut

74.0.074.0.1-alpha.a24e4a.0
dist/Markdown/libs/overrides/utils.js
~dist/Markdown/libs/overrides/utils.jsModified
+3
Index: package/dist/Markdown/libs/overrides/utils.js
===================================================================
--- package/dist/Markdown/libs/overrides/utils.js
+++ package/dist/Markdown/libs/overrides/utils.js
@@ -1,6 +1,9 @@
 import find from 'lodash/find';
 export const isCheckboxParent = (node, type) => Boolean(type === 'checkbox' && node.children && node.children[0]?.name === 'input' && node.children[0]?.attribs?.type === type);
+
+// a <p> that only holds video tags, i.e. a single-line <video></video> that marked parsed as paragraph text
+export const isVideoParent = (node, tagName) => Boolean(node.name === 'p' && node.children?.some(child => child.name === tagName) && node.children.every(child => child.name === tagName || child.type === 'text' && !child.data.trim()));
 export const isLabelText = (node, type) => {
   // we are using this text to create the accessible label, so are basically deduplicating it here
   return Boolean(node?.prev?.name === 'input' && node?.prev?.attribs?.type === type || node?.name === 'p' && node?.parent?.name === 'li' && node.parent.children && node.parent.children[0]?.name === 'input');
 };