Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First processed codeblock result is hidden on reading mode #6

Closed
5 tasks done
Krakor92 opened this issue Apr 21, 2024 · 1 comment
Closed
5 tasks done

First processed codeblock result is hidden on reading mode #6

Krakor92 opened this issue Apr 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Krakor92
Copy link

  • The Plugin is up to date (0.3.1)
  • Obsidian and Installer are up to date (1.5.12)

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
```
  1. Switch to reading mode

Expected behavior
You can see a 1

Actual behavior
Nothing is visible

Tested on

  • Linux
  • Android
  • iPadOS

Additional context

  • Placing a pair of %% with a character inside, or any other character above the code block, will make it behave as expected.
  • It looks like the culprit code is here. The rule should be more specific
@Krakor92 Krakor92 added the bug Something isn't working label Apr 21, 2024
mProjectsCode added a commit that referenced this issue Apr 21, 2024
@mProjectsCode
Copy link
Owner

thanks, should be fixed in 0.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants