Fix colors not showing in lists in editing/live preview

This commit is contained in:
Benji Grant 2024-07-30 10:37:58 +10:00
parent 1bda7b41b6
commit d7863691be
No known key found for this signature in database
GPG key ID: D41929A51D291D4D
2 changed files with 6 additions and 1 deletions

5
.changes/fix-lists.md Normal file
View file

@ -0,0 +1,5 @@
---
"obsidian-css-inlay-colors": patch:fix
---
Fix inlay not showing for colors in an ordered/unordered list in live preview mode

View file

@ -65,7 +65,7 @@ function createColorWidgets(view: EditorView) {
from,
to,
enter: (node) => {
if (node.name === 'inline-code') {
if (node.name.includes('inline-code')) {
const color = view.state.sliceDoc(node.from, node.to)
// Not a valid color