Code blocks are rendered strange for seemingly equivalent languages

Steps to reproduce

Source code rendering within code blocks ( three backticks and language ) look different / strange.

I.e. I try to use the following shell snippet

kubectl run busybox --wait --image=busybox --restart=Never -- \
        sh -c 'while sleep 5 ; do echo "{\"foo\":\"bar\",\"value\":$(date +%s)}" ; done'`

Using three kinds of languages sh, shell or bash results in different renderings in viewer and editor, see attached screenshots.

Expected result

Source highlighting of code blocks works as expected.

Actual result

Editor looks different than viewer and similar languages ( according to this page Prism ) look different.


  • Operating system: macOS 12.5.1 (Intel)

  • Debug info: SYSTEM INFO:
    Obsidian version: v0.15.9
    Installer version: v0.15.9
    Operating system: Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 21.6.0
    Login status: not logged in
    Insider build toggle: off
    Live preview: off
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Restricted mode: on

Additional information

Yes they are different because editor and reader use two different syntax highlighters.