Build 555975stable
Module 490682
929 characters · in abe64d994b0c71cc.jsDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>a}),n(321073);var l=n(22098),i=n(820066);let s=new Set(["line","blockQuote"]),r=[];function a(e,t,n){if(i.VW.areStylesDisabled(e))return[];let[a,o]=t;if(1!==o.length||!i.AS.isInTypes(a,s))return r;let{entries:c,serializedChildren:u}=i.cv.markdown(a,n,!0),d=[];for(let t=0;t<c.length;t++){let n=c[t];if(n.attributes.length>0&&n.text.length>0){let s=c[t-1],r=c[t+1],a={anchor:(0,l.Q)(e,o,u,n.start),focus:(0,l.Q)(e,o,u,n.start+n.text.length)},h=i.VW.nodes(e,{at:a,mode:"lowest",voids:!1}),m={};for(let e of n.attributes)if(m[e]=!0,"syntaxBefore"===e&&null!=r)for(let e of r.attributes)m[`before_${e}`]=!0;else if("syntaxAfter"===e&&null!=s)for(let e of s.attributes)m[`after_${e}`]=!0;for(let[t,n]of h){let t={anchor:i.VW.start(e,n),focus:i.VW.end(e,n)};i.Kh.isBefore(t.anchor,a.anchor)&&(t.anchor=a.anchor),i.Kh.isAfter(t.focus,a.focus)&&(t.focus=a.focus),d.push({...m,...t})}}}return d}}