From d6f812c82938587d56c575a5eaa4a6253706c3a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Fern=C3=A1ndez-Capel?= Date: Mon, 22 Jan 2024 12:48:11 +0000 Subject: [PATCH] Fix attribute name The attribute name is `data-tag-name` not `data-page-name`. Ref. https://github.com/basecamp/trix/blob/06d8b1db5fb682d007c5ca041884f6297674c8b7/src/trix/core/helpers/custom_elements.js#L10-L11 --- src/core/drive/page_renderer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/drive/page_renderer.js b/src/core/drive/page_renderer.js index 76072638f..7e6df4c4c 100644 --- a/src/core/drive/page_renderer.js +++ b/src/core/drive/page_renderer.js @@ -186,9 +186,9 @@ export class PageRenderer extends Renderer { return this.oldHeadStylesheetElements.filter((element) => { return !(element.hasAttribute("data-turbo-permanent") || // Trix dynamically adds styles to the head that we want to keep around which have a - // `data-page-name` attribute. Long term we should moves those styles to Trix's CSS file + // `data-tag-name` attribute. Long term we should moves those styles to Trix's CSS file // but for now we'll just skip removing them - element.hasAttribute("data-page-name")) + element.hasAttribute("data-tag-name")) }) }