Giter Club home page Giter Club logo

Comments (4)

raghur avatar raghur commented on July 20, 2024

Pandoc JSON API changed in 1.16 - see #2

Can you try updating pandoc and let me know if the error persists.

from mermaid-filter.

iagomosqueira avatar iagomosqueira commented on July 20, 2024

I am now on pandoc 1.17.0.2, and after reinstalling I am afraid I still get an error on the same line

$ pandoc -t html -F mermaid-filter -o test.html test.md

/usr/local/lib/node_modules/mermaid-filter/index.js:23
    attrs[2].map(item => {
                       ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
pandoc: Error running filter mermaid-filter
Filter returned error status 8

from mermaid-filter.

raghur avatar raghur commented on July 20, 2024

Ok - that looks like you don't have a recent enough version of node that supports ES6 arrow functions?

I created your file -

This is a markdown!
=====================

And a mermaid diagram

\```mermaid

gantt
    title TASK - PROJECT, JAN-JUN 2016

    section Section
    Task1           :a1, 2014-01-01, 30d
    Task2           :after a1  , 20d
    section Another
    Task in sec     :2014-01-12  , 12d
    anther task     : 24d

\```

and ran pandoc -F mermaid-filter.cmd -o test.html test.md and I got an html as below

<h1 id="this-is-a-markdown">This is a markdown!</h1>
<p>And a mermaid diagram</p>
<p><img src="img\diagram-2.png" /></p>
<p> </p>

My node version -

D:\code\mermaid>node -v
v4.4.4

from mermaid-filter.

iagomosqueira avatar iagomosqueira commented on July 20, 2024

Thanks, it works after updating node via npm. Ubuntu 14.04 has a very
old version.

On 27/06/16 12:23, Raghu wrote:

Ok - that looks like you don't have a recent enough version of node that supports ES6 arrow functions?

I created your file -

This is a markdown!
=====================

And a mermaid diagram

\```mermaid

gantt
     title TASK - PROJECT, JAN-JUN 2016

     section Section
     Task1           :a1, 2014-01-01, 30d
     Task2           :after a1  , 20d
     section Another
     Task in sec     :2014-01-12  , 12d
     anther task     : 24d

\```

and ran pandoc -F mermaid-filter.cmd -o test.html test.md and I got an html as below

<h1 id="this-is-a-markdown">This is a markdown!</h1>
<p>And a mermaid diagram</p>
<p><img src="img\diagram-2.png" /></p>
<p> </p>

My node version -

D:\code\mermaid>node -v
v4.4.4

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#5 (comment)

from mermaid-filter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.