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

.mmd file read and preview #481

Open
yfu-caredx opened this issue Jan 18, 2023 · 1 comment
Open

.mmd file read and preview #481

yfu-caredx opened this issue Jan 18, 2023 · 1 comment

Comments

@yfu-caredx
Copy link

it seems mermaid() function is unable to supporting reading from a file name, instead it shows "syntax error". subsequently, the .mmd file preview function in RStudio is also broken as it basically calls the mermaid() function to preview.
I tested a simple example and it works fine as a string input to mermaid(), but when I saved it as .mmd file and use the filename as input to the function, the syntax error occurs.

@retodomax
Copy link

Same problem for me (with DiagrammeR version 1.0.9)

Here a reproducible example

my_diag <- "graph LR
    A-->B
    A-->C"
DiagrammeR::DiagrammeR(my_diag) ## works as expected
write(my_diag, file = "test.mmd")
DiagrammeR::mermaid("test.mmd") ## does not work

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

2 participants