feat: customize rendering links
Some tags like <a> are simply rendered as <a href. For customizing theming, it is often common to need to add some classes. Also sometimes adding target and rel to links (to make them external)
I undrestand having dynamic callback fn might imply performance and complexity, but would it possible to have simple option to customize default templates in zig code?
i think we can add two flags for this:
LINK_REL_EXTERNAL // rel="external"
LINK_TARGET_BLANK // target="_blank"
what do you think?
That would be nice! Also, perhaps the ability to set the default class or artibrary attrs string? (for styles, it is possible to use a wrapper class like .md a but when using md4w to embed partial renders, it becomes more tricky.
it's a bit complex to pass string to wasm, the flags option is just a number no memory alloc needed