can3p → Dev Notes

Sun, 12 Feb 2023 00:45

dabdab.org supports markdown with the help of goldmark. It's really hard to overestimate the usefulness of a decent parser. Since introducing image uploads I was really worried about hardcoding uploaded links into the message text. I assume message text almost immutable - it's weakly structured and any text updates will be quite painful.

What that means in practice - message text should contain as little representation details as possible and image urls is just one of such details. From now own any media upload will result in a simple <uuid>.png url, which will be properly resolved at the rendering time. The parser was really useful there since it's trivial to walk the parsed tree and update links if necessary

Dabdab.org (c) 2022 — 2023, hi@dabdab.org / Contact us / Twitter