mProjectsCode / obsidian-shiki-plugin

MIT License
43 stars 6 forks source link

Comment color is being overriden to #000001 #7

Closed RankkaApina closed 5 months ago

RankkaApina commented 6 months ago

Describe the bug I have checked from the CSS Inspector that the variable --shiki-code-comment is correct. However, the comments in any code (I've checked python and js) show in color #000001. It's not evident to me where this is set and why it overrides the --shiki-code-comment variable.

This is true for live preview and reading mode. In source mode, the comment color is correct. In addition, non-supported languages (tested fortran), shows the comments in the correct color (I have the same token colors for shiki + normal code)

To Reproduce Steps to reproduce the behavior:

  1. Set the comment color
  2. Check on a note with code that is supported by the plugin.

Expected behavior Comments are show in all modes in the color specified with variable --shiki-code-comment

Screenshots

Fortran live preview (correct comment color) fortran-livepreview

JS source mode (correct comment color) javascript-source

JS live preview (WRONG COMMENT COLOR) javascript-livepreview

Occurs on

Plugin version 0.3.2 (I had the same issue with the previous version, thought it might change with the update).

Additional context N/A

RankkaApina commented 6 months ago

Additional: I just noticed this happens with line numbers also. And it seems to me, that the variable --ec-codeFg somehow overrides this color (at least that's the only one in my setup that I see showing color #000001.

mProjectsCode commented 5 months ago

I can't reproduce this. Which Obsidian theme are you using and what are your plugin settings?

RankkaApina commented 5 months ago

Ok, I tested a bit. Does seem to come from my setup. I use my own theme, and when I switched to my previous one (with same plugins, same snippets), the color is correct. I will investigate further, but it seems this was a false alarm.