@rstacruz/gatsby-remark-component
Version:
When you use a React component in your markdown, it will insert it as a div instead of a p
3 lines (2 loc) • 1.3 kB
JavaScript
var t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],e=require("unist-util-visit");module.exports=function(a,o){var i=a.markdownAST,r=o.components;r&&0!=r.length?r.length>0&&function(t,a){a.forEach(function(a){e(t,"html",function(t,e,o){t.value=="<"+a+">"&&(o.type="div")})})}(i,r):function(a){e(a,"html",function(e,a,o){t.some(function(t){return e.value=="<"+t+">"||e.value.startsWith("<"+t+" ")})||(o.type="div")})}(i)};
//# sourceMappingURL=gatsby-remark-component.module.js.map