Closed fredrik-hammar closed 5 months ago
What exactly do you mean? The syntax highlighting is not done by the extension but by obsidian.
Sorry, forgot to finish the description after adding screenshots. The main problem is that there is no Run button in Read Mode.
I have updated the description.
I reported the syntax issue with Obsidian.
Syntax highlighting for sh code blocks disappears in Reading View - Bug reports - Obsidian Forum
Okay, thats really strange... Does this appear to be always the case or only in this note or under specific circumstances?
Can you please share your OS and obsidian version? Are you using any other plugins that might interfere with the execute code plugin?
I reproduced it now in fresh vault with only Execute Code enabled.
SYSTEM INFO:
Obsidian version: v1.5.3
Installer version: v1.5.3
Operating system: #1 SMP PREEMPT_DYNAMIC Thu, 01 Feb 2024 10:30:35 +0000 6.7.3-arch1-1
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Execute Code v1.10.0
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.
Okay, it looks like there is a problem with the alias sh
(with both Obsidian and the plugin) but it seems to work when you use shell
instead. Would that be a problem?
That's fine with me :)
I think this is an issue in Obsidian anyway. So let's close, and I'll reopen if upstream issue gets fixed and problem still remains.
This is not a huge issue but it was surprising to me because Obsidian recognizes the syntax in Edit Mode, but there's no Run button in Read Mode. Also the syntax highlighting disappears, but this seems to be a perhaps related Obsidian problem.
Source mode