diff options
Diffstat (limited to 'src/content/dependencies/transformContent.js')
| -rw-r--r-- | src/content/dependencies/transformContent.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index fa7f2e88..775ccfdc 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -715,6 +715,7 @@ export default { if (externalLink) { externalLink.setSlots({ content: label, + attributes: {class: 'text-with-tooltip-interaction-cue'}, fromContent: true, }); @@ -736,15 +737,17 @@ export default { content: tooltipContent, // Not sanitized! }); - textWithTooltip.setSlots({ - attributes: [ - {class: 'content-tooltip-guy'}, - externalLink && {class: 'has-link'}, - ], + const attributes = html.attributes(); + attributes.add('class', 'content-tooltip-guy'); - text: externalLink ?? label, - tooltip, - }); + if (externalLink) { + attributes.add('class', 'has-link'); + textWithTooltip.setSlot('text', externalLink); + } else { + textWithTooltip.setSlot('text', label); + } + + textWithTooltip.setSlots({attributes, tooltip}); return {type: 'processed-tooltip', data: textWithTooltip}; } |