diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-11-09 15:49:31 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-11-09 15:49:31 -0400 |
commit | 44cebe7bfaf8f69ff6806e98524d3b5955f2cef2 (patch) | |
tree | a0a44cb95e05a7bf873b929e41965a98d324f8b4 /src/content | |
parent | 443c2e42ad2731e63f40c9575e2c27001ed55bae (diff) |
content: generateListingPage: specially handle 'href' row attribute
But not that specially.
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/generateListingPage.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/content/dependencies/generateListingPage.js b/src/content/dependencies/generateListingPage.js index 403f891f..4c86431d 100644 --- a/src/content/dependencies/generateListingPage.js +++ b/src/content/dependencies/generateListingPage.js @@ -191,9 +191,14 @@ export default { row: rows, attributes: rowAttributes ?? rows.map(() => null), }).map(({row, attributes}) => - html.tag('li', - attributes, - formatListingString('chunk.item', row))))), + (attributes?.href + ? html.tag('li', + html.tag('a', + attributes, + formatListingString('chunk.item', row))) + : html.tag('li', + attributes, + formatListingString('chunk.item', row)))))), ]), ]), ], |