mayurankv / Obsidian-Code-Styler

A plugin for Obsidian.md for styling codeblocks and inline code
Other
287 stars 10 forks source link

Bug: Canvas not Styling #232

Open Runehkt opened 9 months ago

Runehkt commented 9 months ago

Canvas cards when using code blocks does not style correctly

Describe the bug

When creating code blocks in cards while working in canvas mode the code blocks are defaulting to vanilla. Seems it is a cards issue since the style works just fine if you import a file

I don't know

Steps to reproduce

Create a card, make a code block with plugin active, input code, deselect card.

No

Expected behaviour

Style showing up, after card editing is done. even when the code block is deselected.

Current behaviour

Style of code-block returns to vanilla after deselect the coding block. (you stop editing the code inside the code block)

Environment

Debian,Linux

Screenshots

image image

Additional context

mayurankv commented 6 months ago

No, this is a very valid bug report! I don't know how soon I can fix this as I'm currently super busy with exams but they're done soon so will be trying to get quite a few changes done then! Will definitely look into this.

manolo777 commented 6 months ago

Extra information

In my Canva file, when I press on the block, the code seems to render correctly. However, when the cursor moves out of the block, it returns to vanilla.

When the cursor is in the code block..

image

When the cursor is outside the Code block

image

mayurankv commented 1 month ago

Ok this is an issue with the postprocessor (reading mode instead of editing mode). I need to change it so it also selects code in canvas blocks. Will add to the worklist. So sorry for the long wait!