Closed bwplotka closed 3 years ago
oh the whole thing is very messy :P at one point we use byte.buffer pointer as key in map...
the thing is, all this was originally meant to be a short time hack for our usage and later cleaned up, which we never did in the end :D
yeah these buffers are kind of nonsensical, I think it's a remnant of some old design
RenderSingle
is public, because we use it in our code somewhere else outside of this project, I think.
Understandable =D
Bit of a cruft double-whammy.
I migrated about 80% to blackfriday v2 before we ran into more of the inconsistencies there, then @karelbilek migrated that about 90% to goldmark.
Getting to the point where I want to go over it with a fine-tooth comb and refactor/remove the remnants, when I have the time (which is probably going to be next month, at the earliest)
I actually went ahead and cleaned all. Sorry for lots of changes, hope it's reviewable and not biased :crossed_fingers:
1, There are some TODOs still in code:
As well as minor inconsistencies.
buf
usage is quite ambiguous. At some point, we hold so many of those and I am not sure if there is a strong reason. (e.g why we cannot use just resBuf instead of mr.buf). The problem withmr.buf
is that this variable is suddenly used differently depending on the context which can lead easily to side effects etc. It would be nice to scope buf only tomr.RenderSingle
to ensure we can e.g render things concurrently at some point!