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

Code block renders wrong with DataView #2403

Open
shizidushu opened this issue Jul 30, 2024 · 7 comments · May be fixed by #2417
Open

Code block renders wrong with DataView #2403

shizidushu opened this issue Jul 30, 2024 · 7 comments · May be fixed by #2417
Labels
bug Something isn't working.

Comments

@shizidushu
Copy link

What happened?

Normal Code block renders wrong when DataView is enabled.

Here is the code:

```cpp
#include <iostream>
#include <unsupported/Eigen/CXX11/Tensor>

int main() {
    Eigen::Tensor<float, 3> t(3, 3, 3);
    t.setConstant(2);

    const Eigen::Tensor<int, 2>::Dimensions  d(0, 1); 
    std::cout << t.sum(d) << std::endl;

    std::cout << t.sum(Eigen::array<int, 2>({0, 1}));

    return 0;
}
```

Here is what is looks like in Live Preview mode:
图片

The line std::cout << t.sum(Eigen::array<int, 2>({0, 1})); is not shown correctly.

Here is the screenshot of my DataView settings:

图片

How I find it: I turn off the plugins, then close and reopen obsidian to check.

DQL

No response

JS

No response

Dataview Version

0.5.67

Obsidian Version

1.6.7

OS

Windows

@shizidushu shizidushu added the bug Something isn't working. label Jul 30, 2024
@manuraj17
Copy link

Tried reproducing it with the settings, but was not able to

image

Could you share what plugins are being used meanwhile?

@shizidushu
Copy link
Author

@manuraj17 Here is the plugins
图片

@manuraj17
Copy link

manuraj17 commented Aug 6, 2024

@shizidushu Just one last thing - could please you try this with disabling all other plugins except Dataview one time? This will help speed things up a bit. Just trying to isolate the issue here.

Thanks for the sharing the plugins.

@shizidushu
Copy link
Author

@manuraj17 After I disabled all the plugins (refer to the image uploaded before) except Dataview, I close and reopen Obsidian. The problem remains in Live Preview Mode (and no problem in Reading Mode).

The problem may related to the Dataview option Enable inline field highlighting in Live Preview. After I turn off this option, and restart Obsidian, the problem disappears.

@manuraj17
Copy link

@shizidushu Oh okay, I am trying to reproduce this. But unable to, will try couple more times and check. If you can push a test sample vault for this issue I guess it might be easier.

@shizidushu
Copy link
Author

@manuraj17 Here is the sample vault:
testvault.zip

@reply2za
Copy link
Contributor

reply2za commented Aug 16, 2024

With only dataview enabled, I do see there is some rendering related issue. It's not on every line but it is on some lines such as: std::cout << t.sum(Eigen::array<int, 2>({0, 1}));, specifically with the Eigen::array portion on that line.

Edit: It comes and goes - so it's hard to replicate. I'm not sure why I am not seeing it anymore. If you have a means of persisting the incorrect rendering then pls let me know.

Edit-2: I am seeing it again and am able to replicate. It occurs post the screen's viewport.

@reply2za reply2za linked a pull request Aug 17, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants