Skip to content

[BUG] Persistent output broken #427

@superle3

Description

@superle3

Describe the bug
Persistent output doesn't work

Software Version

tested on both windows 10 22H2 and fedora 41 kde on obsidian 1.9.12 and plugin version 2.1.2

To Reproduce
For a new vault, turn on persistent output.
have the file (without the \)

\```python
print(1)
\```

and run the code

Expected behavior
expect an output code block of: (without \)

\```output
1
\```

Additional context

const section: null | { lineStart: number, lineEnd: number } = this.view.previewMode.renderer.sections.find(x => x.el == parent);

In here, the output of section is

Image.
It has the attributes

type start = {line: number, col: number};
type end = { line: number, col: number};

instead of lineEnd and lineStart.

I don't know when this api changed or if this across all devices so solution could be to check for both versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions