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

convert': undefined method convert_footnote' #74

Closed
YenForYang opened this issue Nov 24, 2019 · 3 comments
Closed

convert': undefined method convert_footnote' #74

YenForYang opened this issue Nov 24, 2019 · 3 comments
Assignees
Milestone

Comments

@YenForYang
Copy link

I'm getting an error when trying to use kramdoc on this https://raw.githubusercontent.com/rust-lang/book/master/src/ch08-03-hash-maps.md:

C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:99:in `convert': undefined method `convert_footnote' for #<Kramdown::AsciiDoc::Converter:0x000000000588c200> (NoMethodError)
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:646:in `block in traverse'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:645:in `each'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:645:in `each_with_index'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:645:in `traverse'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:658:in `compose_text'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:193:in `convert_p'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:99:in `convert'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:646:in `block in traverse'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:645:in `each'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:645:in `each_with_index'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:645:in `traverse'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:105:in `convert_root'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/converter.rb:99:in `convert'
	from C:/ruby/gems/gems/kramdown-1.17.0/lib/kramdown/converter/base.rb:105:in `convert'
	from C:/ruby/gems/gems/kramdown-1.17.0/lib/kramdown/document.rb:117:in `method_missing'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/api.rb:52:in `convert'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/api.rb:104:in `convert_file'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/lib/kramdown-asciidoc/cli.rb:117:in `run'
	from C:/ruby/gems/gems/kramdown-asciidoc-1.0.1/bin/kramdoc:12:in `<top (required)>'
	from C:/apps/ruby/current/gems/bin/kramdoc:23:in `load'
	from C:/apps/ruby/current/gems/bin/kramdoc:23:in `<main>'
@YenForYang
Copy link
Author

Seems like the issue only happens when using --format=GFM or --format=kramdown. --format=markdown doesn't produce the error.

However, using --format=markdown doesn't process the footnote properly on the page.

pandoc -s ch08-03-hash-maps.md -t asciidoctor actually seems to work correctly though here.

@mojavelinux
Copy link
Member

mojavelinux commented Nov 24, 2019 via email

@curiouslychase
Copy link

I also ran into this when converting some files (which is fine, I understand footnotes are not a part of any Markdown spec), but wanted to share that most people who use Footnotes are likely using markdown-it or remark with an extension such as markdown-it-footnote.

mojavelinux added a commit to mojavelinux/kramdown-asciidoc that referenced this issue Jul 9, 2021
@mojavelinux mojavelinux self-assigned this Jul 9, 2021
mojavelinux added a commit to mojavelinux/kramdown-asciidoc that referenced this issue Jul 9, 2021
@mojavelinux mojavelinux added this to the v2.0.x milestone Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants