From 6a8006823f386f53e2f3fcc97377e637906259d2 Mon Sep 17 00:00:00 2001 From: CloudHill Date: Mon, 7 Dec 2020 16:52:14 +0700 Subject: [PATCH] outliner fix inline page links not rendering right --- mods/outliner/app.css | 8 ++++---- mods/outliner/mod.js | 2 +- mods/outliner/panel.js | 8 ++++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/mods/outliner/app.css b/mods/outliner/app.css index 7095dc4..03af8f5 100644 --- a/mods/outliner/app.css +++ b/mods/outliner/app.css @@ -23,7 +23,7 @@ background: var(--theme--interactive_hover); } -.outline-header a { +.outline-header .outline-link { width: 100%; height: 100%; padding: 0 14px; @@ -36,16 +36,16 @@ text-overflow: ellipsis; } -.outline-header a:empty:before { +.outline-header .outline-link:empty:before { color: var(--theme--text_ui_info); content: attr(outline-placeholder); display: block; } -.outline-header[header-level="2"] a { +.outline-header[header-level="2"] .outline-link { text-indent: 18px; } -.outline-header[header-level="3"] a { +.outline-header[header-level="3"] .outline-link { text-indent: 36px; } diff --git a/mods/outliner/mod.js b/mods/outliner/mod.js index 0dd85cf..185b25d 100644 --- a/mods/outliner/mod.js +++ b/mods/outliner/mod.js @@ -14,7 +14,7 @@ module.exports = { tags: ['extension', 'panel'], name: 'outliner', desc: 'table of contents.', - version: '1.1.0', + version: '1.1.1', author: 'CloudHill', options: [ { diff --git a/mods/outliner/panel.js b/mods/outliner/panel.js index 428c8b6..d53a14e 100644 --- a/mods/outliner/panel.js +++ b/mods/outliner/panel.js @@ -76,10 +76,11 @@ module.exports = (store, __exports) => { const outlineHeader = createElement(`
- ${headerEl.innerHTML} +
`); + outlineHeader.firstElementChild.innerHTML = headerEl.innerHTML; outline.append(outlineHeader); }) } @@ -117,3 +118,6 @@ module.exports = (store, __exports) => { } } } + + +