Open easrng opened 1 year ago
here's a comparison:
it's not perfectly accurate to cohost (idk why the footnote placement is different) but it's wayyyyyy closer
oh, neat! hmmmmmmmmm yeah before merging this i’d definitely like to see some kinda confirmation that staff (*tags @jkap*) are ok with this level of reversing in a public repo[^1][^2]. i had kinda given up and was waiting for a potential Official Reference Renderer™ when the public API releases…
…i should probably also add some kinda code license before accepting a contribution this big lol added MIT which was already in package json apparently
for a quick review:
[^1]: there are source maps?? [^2]: “You further agree not to copy, translate, port, modify or make derivative works of any portion of the Services” which the cohost-inherited.less file is probably technically already in violation of but,
ok until it is Probably Legal to include the cohost renderer code in this repo, i have for now implemented a terrible, terrible hack in bb2533b. It simply loads the appropriate webpack chunks containing the renderer from cohost dot org itself. I don’t know how cohost does deployments or whether they keep the older static files around, so I’ve also kept the current renderer as fallback if it ever breaks.
that's awful (positive)
everything renders properly now including emojis, link previews, a cohost plus on and off checkbox, and the "Read More" cut (though it's just implemented as a details/summary rn so it doesn't look exactly the same as on cohost). i'm marking this as a draft because it doesn't give you feedback on what the sanitizer removed like prechoster does now. also licensing might be an issue, almost everything in
src/markdown
was copied out of cohost's source maps and edited until it built properly.