mProjectsCode / obsidian-shiki-plugin

MIT License
43 stars 6 forks source link

First processed codeblock result is hidden on reading mode #6

Closed Krakor92 closed 6 months ago

Krakor92 commented 6 months ago

Describe the bug

When a processed codeblock (dataviewjs, js-engine, ...) sits right at the top of a file with no character above it (except newlines), it won't get rendered on reading mode even though the DOM gets populated by whatever the codeblock produces

To Reproduce

  1. Open the Sandbox vault
  2. Install Shiki Highlighter and any other plugin that register a MarkdownPostProcessor (JS Engine for example)
  3. Create a new empty file and paste a simple codeblock that render something
    ```js-engine
    return 1
    ```
  4. Switch to reading mode

Expected behavior You can see a 1

Actual behavior Nothing is visible

Tested on

Additional context

mProjectsCode commented 6 months ago

thanks, should be fixed in 0.3.2