Skip to content

Inline code not highlighted in Live Preview / Edit Mode on Android #82

@BambuSergio

Description

@BambuSergio
  • The Plugin is up to date
  • Obsidian is up to date

Describe the bug

Inline code highlighting setting: Enabled

Inline code that uses Shiki Highlighter syntax (e.g. `{js} const x = 1`) is not highlighted in Live Preview (edit mode) on Android, even with the inline code option enabled in the plugin settings and without any custom CSS applied.

Highlighting works correctly in Reading Mode.

In Live Preview, highlighting only appears under very specific and unreliable circunstances — for example, after editing and saving an Obsidian CSS snippet from an external editor, which seems to trigger an unintended re-render of the plugin.


Expected behavior

Inline code with Shiki language tags should be tokenized and highlighted consistently in Live Preview, the same way it is in Reading Mode.

Actual behavior

In Live Preview, Shiki does not process inline code. No syntax-colored <span> elements are injected into the DOM, so there is nothing for CSS to style. The code appears as plain, unstyled text.


Steps to reproduce

  1. Install Shiki Highlighter and enable the inline code option in its settings.
  2. Open any note in Live Preview mode on an Android device with inline code block that uses Shiki Highlighter syntax (e.g. {js} const x = 1.
  3. Observe that no syntax highlighting is applied.
  4. Switch to Reading Mode — highlighting appears correctly.

Occurs on

  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Plugin version
0.7.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions