0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 08:52:38 +00:00

Merge branch 'master' into Issue_241_Part_II

This commit is contained in:
David Bolack
2024-08-28 21:17:10 -05:00
24 changed files with 16190 additions and 15548 deletions

View File

@@ -102,6 +102,20 @@ renderer.link = function (href, title, text) {
return out;
};
// Expose `src` attribute as `--HB_src` to make the URL accessible via CSS
renderer.image = function (href, title, text) {
href = cleanUrl(href);
if (href === null)
return text;
let out = `<img src="${href}" alt="${text}" style="--HB_src:url(${href});"`;
if (title)
out += ` title="${title}"`;
out += '>';
return out;
}
// Disable default reflink behavior, as it steps on our variables extension
tokenizer.def = function () {
return undefined;