Jason Miller
Jason Miller
More or less yup. I can always tweak sizing a bit to get things down. What are your thoughts on this in the context of your comment about client-side lazy...
Looks good - we'll definitely need to inline the reduce since that's costly. Also the spacing seems off - there's an `.editorconfig` in this repo that should set your editor...
Awesome, thanks!
Looking good! I'll take a look at this locally.
Seems like a good idea, though maybe a little bit presumptive? An option seems good. Also, this library actually uses a little-known method `String.prototype.link` to generate HTML links with proper...
@ShimShamSam yup - I had originally tested out a target change, but then realized target isn't good enough on it's own since that's actually a vulnerability without proper `rel` set....
Ah ok, that helps me understand. Maybe we can add something really low-level like a "chunk processor" API. Just thinking of ways to keep the size down. Issue I ran...
FWIW here's a function that would do it after innerHTML: ```js div.innerHTML = snarkdown(md); retarget(div); function retarget(el) { if (el.nodeName==='A' && !el.target && el.origin!==location.origin) { el.setAttribute('target', '_blank'); el.setAttribute('rel', 'noreferrer noopener');...
@abhishiv I like the idea, but it's probably impossible to convert tokens to nice function names like that given the filesize. Currently it'd be like: ```js snarkdown(str, (md, html) =>...
@ShimShamSam String.protoype.link is provided by the browser, it's not modifiable. The reason we can't add global options like that is because the size impact would be enormous. Just for the...