`convert': undefined method `convert_footnote'
YenForYang opened this issue · comments
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>'
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.
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.