jgrassler / mkdocs-pandoc

[unmaintained] mkdocs -> pandoc converter: use this fork https://github.com/twardoch/mkdocs-combine
Apache License 2.0
107 stars 39 forks source link

IndexError: list index out of range #11

Closed ArminGruner closed 8 years ago

ArminGruner commented 8 years ago

When trying to convert the documentation of mkdocs .-) (https://github.com/mkdocs/mkdocs.git), I get the following exception:

» mkdocs2pandoc >! mkdocs.pd

Traceback (most recent call last):
  File "/home/ag/.local/bin/mkdocs2pandoc", line 9, in <module>
    load_entry_point('mkdocs-pandoc==0.2.5', 'console_scripts', 'mkdocs2pandoc')()
  File "/home/ag/.local/venvs/mkdocs-pandoc/lib/python2.7/site-packages/mkdocs_pandoc/cli/mkdocs2pandoc.py", line 80, in main
    for line in pconv.convert():
  File "/home/ag/.local/venvs/mkdocs-pandoc/lib/python2.7/site-packages/mkdocs_pandoc/pandoc_converter.py", line 157, in convert
    lines = mkdocs_pandoc.filters.tables.TableFilter().run(lines)
  File "/home/ag/.local/venvs/mkdocs-pandoc/lib/python2.7/site-packages/mkdocs_pandoc/filters/tables.py", line 172, in run
    ret.extend(self.convert_table(block))
  File "/home/ag/.local/venvs/mkdocs-pandoc/lib/python2.7/site-packages/mkdocs_pandoc/filters/tables.py", line 102, in convert_table
    if len(row[i]) > widest_cell[i]:
IndexError: list index out of range

I'm using the devel version @ 671174f04df6d95a6c91876d752dcf3a12b31484

jgrassler commented 8 years ago

Oops, mkdocs documentation of all things...Maybe I should have used that as a test case, too :-)

Anyway, I think I see the problem already. I'll try and fix it...

jgrassler commented 8 years ago

The exception's fixed in branch issues/11, thanks for pointing it out!

There is at least one more problem with this documentation (image paths are coming out wrong). I'll see about fixing that too while I am at it.

jgrassler commented 8 years ago

Fixed in version 0.2.6. There are still some problems with broken image paths, but that's a matter for a separate issue, if at all (there's only so much heuristics I can add for dealing with this sort of thing, and no matter what I do chances are the decision they take in one case will be wrong in the other).

ArminGruner commented 8 years ago

Confirmed: worksforme

Thanks and Greets from Munich!