diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-05-25 13:23:04 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-05-25 13:23:04 -0300 |
commit | 6d8fe82b5386af536ca96eb1d89150e201c603e9 (patch) | |
tree | c5d8cce46834facc82e66779e69e7cef67627d28 /src/util/transform-content.js | |
parent | bd0741dcf0c23489bf710249ab8fd9ba647db843 (diff) |
content: sprawl & transformContent
Sprawling basically means tying a component to objects which aren't directly passed to it. This is necessary for functions like transformContent, which was *mostly* implemented here (the multiline/lyrics modes are stubs, and a number of links haven't been implemented yet).
Diffstat (limited to 'src/util/transform-content.js')
-rw-r--r-- | src/util/transform-content.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/util/transform-content.js b/src/util/transform-content.js index d1d0f51a..454cb374 100644 --- a/src/util/transform-content.js +++ b/src/util/transform-content.js @@ -3,7 +3,6 @@ // interfaces for converting various content found in wiki data to HTML for // display on the site. -import * as html from './html.js'; export {transformInline} from './replacer.js'; export const replacerSpec = { @@ -34,7 +33,7 @@ export const replacerSpec = { date: { find: null, value: (ref) => new Date(ref), - html: (date, {language}) => + html: (date, {html, language}) => html.tag('time', {datetime: date.toString()}, language.formatDate(date)), |