diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-05-06 13:37:11 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-05-06 13:37:11 -0300 |
commit | a68d55771317f131217a79b505523758999d8811 (patch) | |
tree | 8c0f79cac22b3ae36200eaae564376a37f531a72 /src/content/dependencies | |
parent | af1db3b02a4e5791aeb46c1f253989a3b10815ac (diff) |
data, content: LyricsEntry.hasSquareBracketAnnotations
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/generateLyricsEntry.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/content/dependencies/generateLyricsEntry.js b/src/content/dependencies/generateLyricsEntry.js index fb8e71cc..02fd3634 100644 --- a/src/content/dependencies/generateLyricsEntry.js +++ b/src/content/dependencies/generateLyricsEntry.js @@ -22,6 +22,9 @@ export default { data: (entry) => ({ isWikiLyrics: entry.isWikiLyrics, + + hasSquareBracketAnnotations: + entry.hasSquareBracketAnnotations, }), slots: { @@ -63,6 +66,13 @@ export default { ? language.formatUnitList(relations.artistLinks) : relations.artistText.slot('mode', 'inline')), }), + + // This check is doubled up only for clarity: entries are coded + // in data so that `hasSquareBracketAnnotations` is only true + // if `isWikiLyrics` is also true. + data.isWikiLyrics && + data.hasSquareBracketAnnotations && + language.$(capsule, 'squareBracketAnnotations'), ]), relations.content.slot('mode', 'lyrics'), |