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

Markdown has wrong CWD #237

Open
AlexandreSajus opened this issue Jan 30, 2022 · 1 comment
Open

Markdown has wrong CWD #237

AlexandreSajus opened this issue Jan 30, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@AlexandreSajus
Copy link
Contributor

Loading images in Markdown blocks is really hard currently as it seems that Markdown blocks don't have the graph's CWD.

For example, with this tree:
image

Using Markdown in VSCode this way works to load an image:
image

But when using Markdown in Pyflow, the markdown block can't find the image:
image

A markdown block should have its graph's CWD.

@AlexandreSajus AlexandreSajus added the bug Something isn't working label Jan 30, 2022
@AlexandreSajus
Copy link
Contributor Author

In markdownblock.py, this sets a custom CWD for markdown:

self.rendered_markdown.setHtml(
            f"{dark_theme}{markdown(t)}",
            baseUrl=QUrl.fromLocalFile(cwd + os.path.sep),
        )

But for now I have not found an easy way to access the CWD from markdownblock.py

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

1 participant