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

Bad handling of block arguments #207

Closed
piranna opened this issue Sep 17, 2015 · 1 comment
Closed

Bad handling of block arguments #207

piranna opened this issue Sep 17, 2015 · 1 comment

Comments

@piranna
Copy link

piranna commented Sep 17, 2015

args and kwargs fields of block object are incorrectly filled. When using a single argument like {% mermaid "user.mmd" %}{% endmermaid %}, the block object get filled as

{ body: '', args: [], kwargs: 'user.mmd', blocks: [] }

and when using two arguments like {% mermaid "user.mmd", "2" %}{% endmermaid %} it gets filled as

{ body: '', args: [ 'user.mmd' ], kwargs: '2', blocks: [] }

According to the docs, positional arguments should be filled in args always, that makes sense. Keyword arguments ({% mermaid src="user.mmd" %}{% endmermaid %}) seems to works as expected:

{ body: '',
  args: [],
  kwargs: { src: 'user.mmd', __keywords: true },
  blocks: [] }

By the way, I think that __keywords field is mostly useless...

@piranna
Copy link
Author

piranna commented Sep 17, 2015

Sorry, wrong project (too much browser tabs open...). I'll close this issue and move it to GitBook instead.

@piranna piranna closed this as completed Sep 17, 2015
mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
…yarn/develop/postcss-8.3.2

Bump postcss from 8.3.0 to 8.3.2
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

1 participant