PageSourceSearch

https://howcasperwhat.github.io/assets/Markdown-CQwuWy2m.js

js howcasperwhat.github.io collected 2026-10-03 09:18:58 UTC 2,203 bytes, 3 lines download raw bytes

1import{d as u,P as M,r as n,b as g,B as v,v as _,x as h,c as x,a as d,L as V,N as b,o as p,A as y,p as k,l as T}from"./app-a8wpNPeh.js";import{g as w,_ as H}from"./ClientMarkdown.vue_vue_type_script_setup_true_lang-Eu0KFqW9.js";import{c as $}from"./markdown-Ckin8P9u.js";const B={relative:"",class:"demo-markdown-wrapper"},L=["innerHTML"],z=u({__name:"ShikiEditor",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(l){const e=M(l,"modelValue"),o=n(),i=n(),a=n();let s;function c(){const r=i.value,t=a.value;t.scrollTop=r.scrollTop,t.scrollLeft=r.scrollLeft}function m(r=""){o.value=s.codeToHtml(r,{lang:"markdown",theme:`vitesse-${h.value?"dark":"light"}`,transformers:[{preprocess(t){if(t.endsWith(`
2`))return`${t}
3`}}]})}return g(async()=>{s=await $({themes:["vitesse-dark","vitesse-light"],langs:["typescript","javascript","markdown","html","css","json","vue","jsx","tsx"]}),v(e,()=>{m(e.value),_(c)},{immediate:!0}),v(h,()=>{m(e.value),_(c)})}),(r,t)=>(p(),x("div",B,[d("div",{ref_key:"preview",ref:a,"pointer-events-none":"","z-10":"","box-border":"","h-full":"","w-full":"","overflow-auto":"","p-4":""},[d("span",{"children-m-0":"",class:"demo-markdown-mock",innerHTML:o.value},null,8,L)],512),V(d("textarea",{ref_key:"editor",ref:i,"onUpdate:modelValue":t[0]||(t[0]=f=>e.value=f),"inset-0":"","z-5":"","resize-none":"","whitespace-pre":"","b-0":"","bg-transparent":"","p-4":"","text-transparent":"","tab-4":"","caret-hex-10b981":"","outline-0":"",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",onScroll:t[1]||(t[1]=f=>c())},null,544),[[b,e.value]])]))}}),S=u({__name:"Markdown",setup(l){const e=n(),o=n("# Markdown");return y("markdown-monaco-editor-content",o),g(()=>{e.value.style.height=w(),e.value.style.maxHeight=w()}),(i,a)=>(p(),x("div",{ref_key:"container",ref:e,grid:"~ cols-2 gap-4","children-bg":"#eee6 dark:#2226","children:rd-4":""},[k(z,{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=s=>o.value=s)},null,8,["modelValue"]),k(H,{content:o.value,"overflow-auto":"","p-4":""},null,8,["content"])],512))}}),D=u({__name:"Markdown",setup(l){return(e,o)=>(p(),T(S,{"m-x-auto":"","max-w-screen-2xl":""}))}});export{D as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.