-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<div> cannot appear as a descendent of <p> #102
Comments
@hesamalavi, thanks for reporting this. Would you like to work on this issue? |
Hey @nickytonline , I would love to, I am not that technical though :D, wouldn't even know were to start. And it would be my first open source anything. Any suggestions? |
I found the issue, we are replacing the link node and not the paragraph node. Therefore the oEmbed html becomes the child of the paragraph. |
When running gastby-remark-oembed-mdx in local host, I get the following error, and only on the -mdx and not -md:
index.js:2177 Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in p (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in wrapper (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in MDXContent (created by MDXRenderer) in MDXRenderer (at pages/index.js:20) in article (at pages/index.js:14) in div (at PageLayout.js:10) in PageLayout (at pages/index.js:11) in BlogMdxIndex (created by HotExportedBlogMdxIndex) in AppContainer (created by HotExportedBlogMdxIndex) in HotExportedBlogMdxIndex (created by PageRenderer) in PageRenderer (at json-store.js:93) in JSONStore (at root.js:51) in RouteHandler (at root.js:73) in div (created by FocusHandlerImpl) in FocusHandlerImpl (created by Context.Consumer) in FocusHandler (created by RouterImpl) in RouterImpl (created by Context.Consumer) in Location (created by Context.Consumer) in Router (created by EnsureResources) in ScrollContext (at root.js:64) in RouteUpdates (at root.js:63) in EnsureResources (at root.js:61) in LocationHandler (at root.js:119) in LocationProvider (created by Context.Consumer) in Location (at root.js:118) in Root (at root.js:126) in MDXProvider (at wrap-root-element.js:65) in MDXScopeProvider (at wrap-root-element.js:64) in Unknown in Unknown (at wrap-root-element.js:72) in _default (at app.js:67) __stack_frame_overlay_proxy_console__ @ index.js:2177 index.js:2177 Warning: React does not recognize the
allowTransparencyprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase
allowtransparencyinstead. If you accidentally passed it from a parent component, remove it from the DOM element. in iframe (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in p (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in wrapper (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in MDXContent (created by MDXRenderer) in MDXRenderer (at pages/index.js:20) in article (at pages/index.js:14) in div (at PageLayout.js:10) in PageLayout (at pages/index.js:11) in BlogMdxIndex (created by HotExportedBlogMdxIndex) in AppContainer (created by HotExportedBlogMdxIndex) in HotExportedBlogMdxIndex (created by PageRenderer) in PageRenderer (at json-store.js:93) in JSONStore (at root.js:51) in RouteHandler (at root.js:73) in div (created by FocusHandlerImpl) in FocusHandlerImpl (created by Context.Consumer) in FocusHandler (created by RouterImpl) in RouterImpl (created by Context.Consumer) in Location (created by Context.Consumer) in Router (created by EnsureResources) in ScrollContext (at root.js:64) in RouteUpdates (at root.js:63) in EnsureResources (at root.js:61) in LocationHandler (at root.js:119) in LocationProvider (created by Context.Consumer) in Location (at root.js:118) in Root (at root.js:126) in MDXProvider (at wrap-root-element.js:65) in MDXScopeProvider (at wrap-root-element.js:64) in Unknown in Unknown (at wrap-root-element.js:72) in _default (at app.js:67) __stack_frame_overlay_proxy_console__ @ index.js:2177 index.js:2177 Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in a (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in blockquote (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in undefined (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in p (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in wrapper (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in MDXContent (created by MDXRenderer) in MDXRenderer (at pages/index.js:20) in article (at pages/index.js:14) in div (at PageLayout.js:10) in PageLayout (at pages/index.js:11) in BlogMdxIndex (created by HotExportedBlogMdxIndex) in AppContainer (created by HotExportedBlogMdxIndex) in HotExportedBlogMdxIndex (created by PageRenderer) in PageRenderer (at json-store.js:93) in JSONStore (at root.js:51) in RouteHandler (at root.js:73) in div (created by FocusHandlerImpl) in FocusHandlerImpl (created by Context.Consumer) in FocusHandler (created by RouterImpl) in RouterImpl (created by Context.Consumer) in Location (created by Context.Consumer) in Router (created by EnsureResources) in ScrollContext (at root.js:64) in RouteUpdates (at root.js:63) in EnsureResources (at root.js:61) in LocationHandler (at root.js:119) in LocationProvider (created by Context.Consumer) in Location (at root.js:118) in Root (at root.js:126) in MDXProvider (at wrap-root-element.js:65) in MDXScopeProvider (at wrap-root-element.js:64) in Unknown in Unknown (at wrap-root-element.js:72) in _default (at app.js:67) __stack_frame_overlay_proxy_console__ @ index.js:2177 index.js:2177 Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in a (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in blockquote (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in undefined (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in p (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in wrapper (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in MDXContent (created by MDXRenderer) in MDXRenderer (at pages/index.js:20) in article (at pages/index.js:14) in div (at PageLayout.js:10) in PageLayout (at pages/index.js:11) in BlogMdxIndex (created by HotExportedBlogMdxIndex) in AppContainer (created by HotExportedBlogMdxIndex) in HotExportedBlogMdxIndex (created by PageRenderer) in PageRenderer (at json-store.js:93) in JSONStore (at root.js:51) in RouteHandler (at root.js:73) in div (created by FocusHandlerImpl) in FocusHandlerImpl (created by Context.Consumer) in FocusHandler (created by RouterImpl) in RouterImpl (created by Context.Consumer) in Location (created by Context.Consumer) in Router (created by EnsureResources) in ScrollContext (at root.js:64) in RouteUpdates (at root.js:63) in EnsureResources (at root.js:61) in LocationHandler (at root.js:119) in LocationProvider (created by Context.Consumer) in Location (at root.js:118) in Root (at root.js:126) in MDXProvider (at wrap-root-element.js:65) in MDXScopeProvider (at wrap-root-element.js:64) in Unknown in Unknown (at wrap-root-element.js:72) in _default (at app.js:67) __stack_frame_overlay_proxy_console__ @ index.js:2177 index.js:2177 Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in a (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in div (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in blockquote (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in undefined (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in p (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in wrapper (created by MDXCreateElement) in MDXCreateElement (created by MDXContent) in MDXContent (created by MDXRenderer) in MDXRenderer (at pages/index.js:20) in article (at pages/index.js:14) in div (at PageLayout.js:10) in PageLayout (at pages/index.js:11) in BlogMdxIndex (created by HotExportedBlogMdxIndex) in AppContainer (created by HotExportedBlogMdxIndex) in HotExportedBlogMdxIndex (created by PageRenderer) in PageRenderer (at json-store.js:93) in JSONStore (at root.js:51) in RouteHandler (at root.js:73) in div (created by FocusHandlerImpl) in FocusHandlerImpl (created by Context.Consumer) in FocusHandler (created by RouterImpl) in RouterImpl (created by Context.Consumer) in Location (created by Context.Consumer) in Router (created by EnsureResources) in ScrollContext (at root.js:64) in RouteUpdates (at root.js:63) in EnsureResources (at root.js:61) in LocationHandler (at root.js:119) in LocationProvider (created by Context.Consumer) in Location (at root.js:118) in Root (at root.js:126) in MDXProvider (at wrap-root-element.js:65) in MDXScopeProvider (at wrap-root-element.js:64) in Unknown in Unknown (at wrap-root-element.js:72) in _default (at app.js:67) __stack_frame_overlay_proxy_console__ @ index.js:2177 index.js:2177 Warning: Invalid DOM property
xmlnsXLink. Did you mean
xmlnsXlink`?in svg (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in div (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in a (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in div (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in blockquote (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in undefined (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in p (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in wrapper (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in MDXContent (created by MDXRenderer)
in MDXRenderer (at pages/index.js:20)
in article (at pages/index.js:14)
in div (at PageLayout.js:10)
in PageLayout (at pages/index.js:11)
in BlogMdxIndex (created by HotExportedBlogMdxIndex)
in AppContainer (created by HotExportedBlogMdxIndex)
in HotExportedBlogMdxIndex (created by PageRenderer)
in PageRenderer (at json-store.js:93)
in JSONStore (at root.js:51)
in RouteHandler (at root.js:73)
in div (created by FocusHandlerImpl)
in FocusHandlerImpl (created by Context.Consumer)
in FocusHandler (created by RouterImpl)
in RouterImpl (created by Context.Consumer)
in Location (created by Context.Consumer)
in Router (created by EnsureResources)
in ScrollContext (at root.js:64)
in RouteUpdates (at root.js:63)
in EnsureResources (at root.js:61)
in LocationHandler (at root.js:119)
in LocationProvider (created by Context.Consumer)
in Location (at root.js:118)
in Root (at root.js:126)
in MDXProvider (at wrap-root-element.js:65)
in MDXScopeProvider (at wrap-root-element.js:64)
in Unknown
in Unknown (at wrap-root-element.js:72)
in _default (at app.js:67)
stack_frame_overlay_proxy_console @ index.js:2177
index.js:2177 Warning: validateDOMNesting(...):
cannot appear as a descendant of
.
in p (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in div (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in blockquote (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in undefined (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in p (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in wrapper (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in MDXContent (created by MDXRenderer)
in MDXRenderer (at pages/index.js:20)
in article (at pages/index.js:14)
in div (at PageLayout.js:10)
in PageLayout (at pages/index.js:11)
in BlogMdxIndex (created by HotExportedBlogMdxIndex)
in AppContainer (created by HotExportedBlogMdxIndex)
in HotExportedBlogMdxIndex (created by PageRenderer)
in PageRenderer (at json-store.js:93)
in JSONStore (at root.js:51)
in RouteHandler (at root.js:73)
in div (created by FocusHandlerImpl)
in FocusHandlerImpl (created by Context.Consumer)
in FocusHandler (created by RouterImpl)
in RouterImpl (created by Context.Consumer)
in Location (created by Context.Consumer)
in Router (created by EnsureResources)
in ScrollContext (at root.js:64)
in RouteUpdates (at root.js:63)
in EnsureResources (at root.js:61)
in LocationHandler (at root.js:119)
in LocationProvider (created by Context.Consumer)
in Location (at root.js:118)
in Root (at root.js:126)
in MDXProvider (at wrap-root-element.js:65)
in MDXScopeProvider (at wrap-root-element.js:64)
in Unknown
in Unknown (at wrap-root-element.js:72)
in _default (at app.js:67)
stack_frame_overlay_proxy_console @ index.js:2177
index.js:2177 Warning: validateDOMNesting(...):
.
in div (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in blockquote (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in undefined (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in p (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in wrapper (created by MDXCreateElement)
in MDXCreateElement (created by MDXContent)
in MDXContent (created by MDXRenderer)
in MDXRenderer (at pages/index.js:20)
in article (at pages/index.js:14)
in div (at PageLayout.js:10)
in PageLayout (at pages/index.js:11)
in BlogMdxIndex (created by HotExportedBlogMdxIndex)
in AppContainer (created by HotExportedBlogMdxIndex)
in HotExportedBlogMdxIndex (created by PageRenderer)
in PageRenderer (at json-store.js:93)
in JSONStore (at root.js:51)
in RouteHandler (at root.js:73)
in div (created by FocusHandlerImpl)
in FocusHandlerImpl (created by Context.Consumer)
in FocusHandler (created by RouterImpl)
in RouterImpl (created by Context.Consumer)
in Location (created by Context.Consumer)
in Router (created by EnsureResources)
in ScrollContext (at root.js:64)
in RouteUpdates (at root.js:63)
in EnsureResources (at root.js:61)
in LocationHandler (at root.js:119)
in LocationProvider (created by Context.Consumer)
in Location (at root.js:118)
in Root (at root.js:126)
in MDXProvider (at wrap-root-element.js:65)
in MDXScopeProvider (at wrap-root-element.js:64)
in Unknown
in Unknown (at wrap-root-element.js:72)
in _default (at app.js:67)
stack_frame_overlay_proxy_console @ index.js:2177
index.js:2177 Warning: validateDOMNesting(...):
The text was updated successfully, but these errors were encountered: