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

Prismic V2: prismic2markdown Type errors #18

Open
seppviljar opened this issue Apr 23, 2024 · 0 comments
Open

Prismic V2: prismic2markdown Type errors #18

seppviljar opened this issue Apr 23, 2024 · 0 comments

Comments

@seppviljar
Copy link

RE: #17 - this issue is about V2 Prismic file

I'm inexperienced with Ruby so this may be a complete newbie problem but I'm not getting it to work with even a small JSON file from Prismic's API.

Sample file: trust.json

 **prismic2markdown --format v2 – "$(cat /Downloads/trust.json)"**
/Users/viljarsepp/.rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/kramdown-prismic-0.3.10/lib/kramdown-prismic/parser/migration_api.rb:22:in `parse_element': no implicit conversion of Symbol into Integer (TypeError)

type = block[:type].gsub('-', '_')
              ^^^^^
from ../ruby-3.3.0/lib/ruby/gems/3.3.0/gems/kramdown-prismic-0.3.10/lib/kramdown-prismic/parser/**migration_api.rb**:15:in `block in parse'
from ../ruby-3.3.0/lib/ruby/gems/3.3.0/gems/kramdown-prismic-0.3.10/lib/kramdown-prismic/parser/migration_api.rb:14:in `each'
from ../ruby-3.3.0/lib/ruby/gems/3.3.0/gems/kramdown-prismic-0.3.10/lib/kramdown-prismic/parser/migration_api.rb:14:in `reduce'
from ../ruby-3.3.0/lib/ruby/gems/3.3.0/gems/kramdown-prismic-0.3.10/lib/kramdown-prismic/parser/migration_api.rb:14:in `parse'
from ../ruby-3.3.0/lib/ruby/gems/3.3.0/gems/kramdown-2.4.0/lib/kramdown/parser/base.rb:69:in `parse'
from ../ruby-3.3.0/lib/ruby/gems/3.3.0/gems/kramdown-2.4.0/lib/kramdown/document.rb:102:in `initialize'
from ../ruby-3.3.0/lib/ruby/gems/3.3.0/gems/kramdown-prismic-0.3.10/bin/prismic2markdown:28:in `new'
from ../ruby-3.3.0/lib/ruby/gems/3.3.0/gems/kramdown-prismic-0.3.10/bin/prismic2markdown:28:in `<top (required)>'
from ../ruby-3.3.0/bin/prismic2markdown:25:in `load'
from ../ruby-3.3.0/bin/prismic2markdown:25:in `<main>'
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