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

🐞 File view crashes when unclosed dice rolling inline block + property present #363

Open
3 of 7 tasks
Restioson opened this issue Dec 18, 2024 · 2 comments
Open
3 of 7 tasks

Comments

@Restioson
Copy link

Restioson commented Dec 18, 2024

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

The dice roller expression fails to work, but the markdown file still loads.

Current behaviour

A "failed to open" toast appears in the top left, along with the following logs in console:

RangeError: Decorations that replace line breaks may not be specified via plugins
    at e.point (app.js:1:339025)
    at e.spans (app.js:1:295577)
    at e.build (app.js:1:340067)
    at t.updateChildren (app.js:1:355362)
    at t.updateInner (app.js:1:353846)
    at t.update (app.js:1:353650)
    at e.update (app.js:1:443479)
    at e.dispatchTransactions (app.js:1:440040)
    at e.dispatch (app.js:1:442028)
    at t.set (app.js:1:1622386)
(anonymous) @ app.js:1

Reproduction

Make a file like this: https://gist.github.com/Restioson/872daa6b46b73f696549b30c53c2a44e. The fact that the markdown is malformed is necessary!

Enable the plugin and try to open the Random page again. It should crash

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

1.7.7 and 1.4.16

Plugin Version

11.4.1

Confirmation

  • I have disabled all other plugins and the issue still persists.
@Restioson
Copy link
Author

Think this is mis-reported. I previously had it crashing when the block was unknown, and then fixed it by making it a real block (there was a typo), but now even the real block does not work, so it must be something about that block instead. I will upload the full files to a gist

@Restioson Restioson changed the title 🐞 File view crashes when rolling on table via block reference that does not exist 🐞 File view crashes when unclosed dice rolling inline block + property present Dec 18, 2024
@Restioson
Copy link
Author

I've edited the original submission with a confirmed MRE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant