Comments (11)
Hey all,
I don't think the main problem here is that mermaid CLI hangs on syntax errors, but rather that mermaid-filter uses an outdated mermaid version that produces these syntax errors.
The package.json file of mermaid-filter defines a mermaid version of ^7.1.2
, while the newest mermaid version is 8.4.8
.
After cloning mermaid-filter and manually bumping the major version of mermaid, I am able to render my mermaid graphs without hanging.
Is there a reason why mermaid-filter doesn't use mermaid 8.x.x
?
from mermaid-filter.
Thanks folks... just updated package.json and published to npm
from mermaid-filter.
@raghur I still can reproduce the issue using v1.4.2
. Can you confirm it's fixed?
from mermaid-filter.
hmm - I used your test diagram to verify and added it to test.md.
Can you confirm that you see a mermaid-filter.err
being created (this is stderr being redirected to a file). Pandoc does not like it if there's anything on stdout other than valid pandoc JSON and hangs otherwise.
Also, can you confirm index.js file contents and that it's the right one being invoked?
from mermaid-filter.
I add another example @raghur, the following mermaid code, enclosed in a TEST.md
file.
graph TD
subgraph "Destination"
Foo
end
Along with the following pandoc command:
MERMAID_FILTER_FORMAT='svg' pandoc --verbose -V geometry:margin=1in --highlight-style haddock --standalone --self-contained --toc --top-level-division=chapter -f markdown -t latex -F mermaid-filter -o my-pdf.pdf TEST.md
Creates an empty mermaid-filter.err
file when executed and still hangs forever.
from mermaid-filter.
So this seems to be a slightly different manifestation of the same issue.
For the original issue you reported, I added it to the test.md that's in the repository and can be tested.
This new example with the subgraph and it does hang and there's nothing in the err file either.
Do note that I'm unable to run your command as is - I'm testing with just
pandoc -i test.md -F mermaid-filter.cmd -t html -o test.html
I'll look into this more when I get time.
from mermaid-filter.
We are using mermaid filter to automatically generate pdf's on a markdown repository ci builds and sometimes builds hang forever on CI because of this.
By the way, thank you @raghur for the help and your awesome work, I wish I could help with this, but I know nothing about JS.
from mermaid-filter.
Hello @raghur we have found another problematic usecase.
If you write a simple mermaid graph LR
like this:
graph LR
A --> B --> C --> D
The tool also creates an empty mermaid-filter.err
file, and hangs forever.
I don't know if the cause could be the same or not, but this might be another good scenario to test.
In order to make this work and get the same output, we had to rewrite all of our graphs to include just a "command" per line like this:
graph LR
A --> B
B --> C
C --> D
from mermaid-filter.
This hit us today, as well... Did you have a time to look into it? Thank you for your work!
from mermaid-filter.
See - mermaidjs/mermaid.cli#77
Both for this example and for the previous one with a subgraph quote, mermaid.cli errors out with a parse error and hangs.
Its strange though since the live editor does not report a problem with A --> B --> C -->D
or with the earlier example of subgraph with quotations.
from mermaid-filter.
I confirm that with 8.4.4 no hangs occur.
from mermaid-filter.
Related Issues (20)
- can we place nodes relative to each other? HOT 1
- Publishing a new NPM release HOT 1
- Please upgrade to mermaid-cli v9 HOT 4
- Allow embedding `svg` directly into the HTML document HOT 1
- DeprecationWarning: Buffer() is deprecated
- Google slides fail to show mermaid images embeded on pptx using mermaid-filter HOT 1
- Need to install librsvg on Mac to use SVG format HOT 1
- fantastic news, sequenceDiagram working with Chinese characters too.
- Mermaid Ink Save Path Option
- I am having trouble getting the filter to work HOT 1
- [Feature request/minor bug] Allow mermaid-filter to work with Bun? HOT 1
- internal syntax error HOT 1
- Hidden graph nodes
- After fresh install, it does not work HOT 3
- pandoc-crossref cannot recognize fig id of mermaid HOT 1
- npm WARN deprecated [email protected]: < 21.5.0 is no longer supported HOT 1
- Set meta-data from command-line? HOT 1
- PNG width not working
- fontawesome not working in SVG
- Need some help with this please HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mermaid-filter.