mProjectsCode / mProjectsCode/obsidian-shiki-plugin

Code blocks not being able to render in table in reading mode when using sheets-extended plugin

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
238
Forks
25
PR merge metrics
No merged PRs in 30d

Description

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

Describe the bug/To Reproduce
If this sheets extended plugin and shiki highlighter are both turned on, and you have a table with embedded code block:

| table head                            |
| ------------------------------------- |
| ![[any note containing a code block]] |

The rendering looks correct in the live preview mode, and we can see the code blocks in the embedded note. But in reading mode, while the other non code block contents will still render, the code blocks will just disappear from the flow. Looking into the DOM tree, the code block in embedded note inside a table cell does have an empty <div class="block-language-*"></div> element in place.

When either sheets extended or shiki highlighter is turned off, the rendering in reading mode looks right.

Screenshots

in live preview mode in reading mode
Image Image

Occurs on

  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Plugin version
0.5.0

Additional context
Thank you so much for your great work on this plugin! I'd really appreciate it if you could take a look at this and hopefully can fix the compatibility issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Obsidian with the sheets extended plugin and shiki highlighter enabled, using an embedded code block inside a table. Compare live preview and reading mode, and inspect the empty block-language element in the DOM. Done means the embedded code block renders correctly in reading mode while both plugins remain enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.