this repo has no description

check image.complete

12Me21 f3000b42 62b1cd34

+21 -9
+14 -9
parse.js
··· 175 return node 176 } 177 178 const CLOSE=(cancel)=>{ 179 let o = pop() 180 let type = o.type ··· 257 current.prev = type in IS_BLOCK ? 'block' : o.prev 258 } 259 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 // push empty tag 268 const BLOCK=(type, args)=>{ 269 current.content.push({type, args}) ··· 595 // todo: close lists too 596 //current.content.push("") 597 //current.prev = 'block' 598 - } else 599 - TEXT(token.substring(1)) 600 } break; case 'QUOTE': { 601 read_args() 602 read_body(true)
··· 175 return node 176 } 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 + 188 const CLOSE=(cancel)=>{ 189 let o = pop() 190 let type = o.type ··· 267 current.prev = type in IS_BLOCK ? 'block' : o.prev 268 } 269 270 // push empty tag 271 const BLOCK=(type, args)=>{ 272 current.content.push({type, args}) ··· 598 // todo: close lists too 599 //current.content.push("") 600 //current.prev = 'block' 601 + } else { 602 + current.content.push(token.slice(1)) 603 + current.prev = 'text' 604 + } 605 } break; case 'QUOTE': { 606 read_args() 607 read_body(true)
+2
render.js
··· 104 // https://html.spec.whatwg.org/multipage/images.html#img-available 105 if (e.naturalHeight) { 106 this.set_size(e, 'size') 107 } 108 e.onerror = (event)=>{ 109 event.target.dataset.state = 'error'
··· 104 // https://html.spec.whatwg.org/multipage/images.html#img-available 105 if (e.naturalHeight) { 106 this.set_size(e, 'size') 107 + } else if (e.complete) { 108 + event.target.dataset.state = 'loaded' 109 } 110 e.onerror = (event)=>{ 111 event.target.dataset.state = 'error'
+5
testing/index.html
··· 400 ##[wh at] 401 a 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"]}
··· 400 ##[wh at] 401 a 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"}