this repo has no description

check image.complete

12Me21 f3000b42 62b1cd34

+21 -9
+14 -9
parse.js
··· 175 175 return node 176 176 } 177 177 178 + // push text 179 + const TEXT=(text)=>{ 180 + if ('block'===current.prev) 181 + text = text.replace(/^ +/, "") 182 + if (text!=="") { 183 + current.content.push(text) // todo: merge with surrounding textnodes? 184 + current.prev = 'text' 185 + } 186 + } 187 + 178 188 const CLOSE=(cancel)=>{ 179 189 let o = pop() 180 190 let type = o.type ··· 257 267 current.prev = type in IS_BLOCK ? 'block' : o.prev 258 268 } 259 269 260 - // push text 261 - const TEXT=(text)=>{ 262 - if (text!=="") { 263 - current.content.push(text) // todo: merge with surrounding textnodes? 264 - current.prev = 'text' 265 - } 266 - } 267 270 // push empty tag 268 271 const BLOCK=(type, args)=>{ 269 272 current.content.push({type, args}) ··· 595 598 // todo: close lists too 596 599 //current.content.push("") 597 600 //current.prev = 'block' 598 - } else 599 - TEXT(token.substring(1)) 601 + } else { 602 + current.content.push(token.slice(1)) 603 + current.prev = 'text' 604 + } 600 605 } break; case 'QUOTE': { 601 606 read_args() 602 607 read_body(true)
+2
render.js
··· 104 104 // https://html.spec.whatwg.org/multipage/images.html#img-available 105 105 if (e.naturalHeight) { 106 106 this.set_size(e, 'size') 107 + } else if (e.complete) { 108 + event.target.dataset.state = 'loaded' 107 109 } 108 110 e.onerror = (event)=>{ 109 111 event.target.dataset.state = 'error'
+5
testing/index.html
··· 400 400 ##[wh at] 401 401 a 402 402 🟩 {"type":"ROOT","content":[{"type":"heading","args":{"level":2,"id":"-what"},"content":["deez"]},{"type":"heading","args":{"level":2,"id":"what"},"content":["deez"]},{"type":"heading","args":{"level":2,"id":"wh-at"},"content":["deez"]},{"type":"heading","args":{"level":2,"id":"-wh-at"},"content":["deez"]},{"type":"heading","args":{"level":2,"id":"wh-at"},"content":[]},"a"]} 403 + 404 + 🟩 trim space after block 405 + !https://qcs.shsbs.xyz/api/File/raw/dmheh?size=100&crop=true 406 + i.. 407 + 🟩 {"type":"ROOT","content":[{"type":"image","args":{"url":"https://qcs.shsbs.xyz/api/File/raw/dmheh?size=100&crop=true"}},"i.."],"prev":"text"}