mugiwara85 / CodeblockCustomizer

Codeblock Customizer plugin for Obsidian
MIT License
151 stars 7 forks source link

Tasks code block keeps unfolding #96

Open conservative-dude opened 2 weeks ago

conservative-dude commented 2 weeks ago

Hi,

I use Obsidian 1.6.5 with CodeBlock Customizer and Tasks plugins. I have this weird behaviour in Live Preview when tasks codeblock keeps filling up with duplicated values from the tasks query and then cleaning up the duplicated values. It happens only when the current file also has some tasks.

I have disabled tasks in CodeBlock Customizer but the issue is still there.

Screenshot 2024-07-05 at 11 43 06

To reproduce: Step1 Create a file Tasks with

- [ ] Task 1
    - [ ] Task 2
    - [x] Task 3
    - [ ] Task 4
- [x] Task 6
- [ ] Task 7

Step2 Create an Example file with

Tasks

\```tasks
path includes Tasks
\```

# About yesterday
Some summary
- 1
- 2

# Plan for today
- [ ] 

and try to open it in Live Preview. If you'll try to add anything into "About yesterday" list, you will see the tasks codeblock flicking.

When I disable CodeBlock Customizer plugin, this issue no longer happens.

https://github.com/mugiwara85/CodeblockCustomizer/assets/55538308/caac2373-f5ae-44e0-b4c1-413f849560cb

mugiwara85 commented 2 weeks ago

Hi! I will look into it, and get back to you. There were 2 other people who had problems with the Tasks plugin(#55, #71) , but none of them provided detailed steps to reproduce the issue. Did you notice any other problems with the tasks plugin?

conservative-dude commented 2 weeks ago

haha thanks @mugiwara85

Pls do note that the issue happens only there are tasks in the note itself (like in my example if I remove the task from 'Plan for today' section, the issue is gone.

I haven't noticed any other issues with the tasks plugin but I tried another plugin for code blocks (Code Styler) and I ran into exactly same issue, so i guess your plugin and that one share some common root cause.