CodeblockCustomizer icon indicating copy to clipboard operation
CodeblockCustomizer copied to clipboard

After the code block is indented, the left border is next to the code

Open HiramYang opened this issue 4 months ago • 11 comments

After the code block is indented, the left border is next to the code.

I have tried this phenomenon in the sandbox and in the Obsidian I use.

Image

Obsidian Version Information: Sandbox environment information: SYSTEM INFO: Obsidian version: v1.9.10 Installer version: v1.8.10 Operating system: Windows 10 Pro 10.0.19045 Login status: not logged in Language: zh Insider build toggle: off Live preview: on Base theme: dark Community theme: none Snippets enabled: 0 Restricted mode: off Plugins installed: 1 Plugins enabled: 1 1: Codeblock Customizer v1.3.1

RECOMMENDATIONS: Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

HiramYang avatar Aug 24 '25 04:08 HiramYang

Oh, you are right. I forgot to add padding when line numbers are not enabled. If line numbers are enabled, then it is correct. I'll fix it today and get back to you.

mugiwara85 avatar Aug 24 '25 10:08 mugiwara85

@HiramYang You can take the current styles.css file and overwrite yours with it. That should fix the problem, however I noticed another problem with indented blocks in reading view, which is caused by Obsidian (this wasn't the case earlier). I am currently fixing that, but that could take a little longer. After that is fixed, I will release a new version.

mugiwara85 avatar Aug 24 '25 17:08 mugiwara85

OK, thank you for your reply

HiramYang avatar Aug 25 '25 07:08 HiramYang

I forgot to closethis. This is fixed in version 1.3.0 and above

mugiwara85 avatar Sep 18 '25 20:09 mugiwara85

The version of the plugin I'm currently downloading is 1.3.1, but this issue still hasn't been resolved. I tried downloading the plugin file from github and installing it in obsidian, but the same problem still occurred

Image Image

HiramYang avatar Sep 19 '25 01:09 HiramYang

I am confused now. This is how it looks on my end:

Image

Last time I asked you test the styles.css did that work?

mugiwara85 avatar Sep 19 '25 01:09 mugiwara85

Also which theme are you using? Maybe that causes it?

mugiwara85 avatar Sep 19 '25 01:09 mugiwara85

I reproduced this issue in the sandbox (by installing this plugin in the Obsidian plugin store), and also replaced the original plugin file with styles.css. Additionally, this problem only occurred in the Edit view and displayed normally in the read view

Image Image

HiramYang avatar Sep 19 '25 02:09 HiramYang

ok, I can reproduce it. I will fix this today. Sorry, I thought I already fixed this, but apparently I forgot

mugiwara85 avatar Sep 19 '25 10:09 mugiwara85

OK, thank you for your reply

HiramYang avatar Sep 22 '25 02:09 HiramYang

@HiramYang I just checked again, but it should work. Are you sure you downloaded the correct styles.css and have overwritten the correct local file? Just to be sure:

  • You have to download this file styles.css
  • And then overwrite yours with it. This is what you need to overwrite: VaultFolder/.obsidian/plugins/codeblock-customizer/styles.css
  • Also please check if the styles.css you downloaded this:
.codeblock-customizer .markdown-source-view [class^="codeblock-customizer-line"][style*="--level:"] {
  padding-left: var(--line-number-gutter-padding);
}

I think you might have either accidently downloaded the wrong file, or overwritten the wrong file. If you checked everything, and the padding is still missing, then there is something else wrong, but the above css fixes this problem. I checked again, this is what I committed on Aug 24th.

Please give a feedback!

mugiwara85 avatar Oct 12 '25 23:10 mugiwara85