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

Error on build in filters/tables.py #25

Open
adrianhall opened this issue Apr 22, 2017 · 2 comments
Open

Error on build in filters/tables.py #25

adrianhall opened this issue Apr 22, 2017 · 2 comments

Comments

@adrianhall
Copy link

Windows 10
Python 2.7.13
mkdocs 0.16.3
mkdocs-material 1.5.4
pandoc installed from chocolatey 0.10.5

Site being created: https://github.com/adrianhall/develop-mobile-apps-with-csharp-and-azure

D:\GitHub\develop-mobile-apps-with-csharp-and-azure [master +1 ~0 -0 !]> mkdocs2pandoc > editions/editions1.pd
Traceback (most recent call last):
  File "C:\Python27\Scripts\mkdocs2pandoc-script.py", line 11, in <module>
    load_entry_point('mkdocs-pandoc==0.2.6', 'console_scripts', 'mkdocs2pandoc')()
  File "c:\python27\lib\site-packages\mkdocs_pandoc\cli\mkdocs2pandoc.py", line 80, in main
    for line in pconv.convert():
  File "c:\python27\lib\site-packages\mkdocs_pandoc\pandoc_converter.py", line 165, in convert
    lines = mkdocs_pandoc.filters.tables.TableFilter().run(lines)
  File "c:\python27\lib\site-packages\mkdocs_pandoc\filters\tables.py", line 177, in run
    ret.extend(self.convert_table(block))
  File "c:\python27\lib\site-packages\mkdocs_pandoc\filters\tables.py", line 91, in convert_table
    for i in range(0, len(self._split_row(lines_orig[0], has_border))):
TypeError: _split_row() takes exactly 2 arguments (3 given)
@adrianhall
Copy link
Author

The problem is that the signature in markdown.extensions.tables has changed:

    def _split_row(self, row):
        """ split a row of text into list of cells. """
        if self.border:
            if row.startswith('|'):
                row = row[1:]
            row = self.RE_END_BORDER.sub('', row)
        return self._split(row)

Removing the has_border makes it work, but it stinks. You probably want to copy the older version into your code and use that rather than rely on a private API.

@se
Copy link

se commented Jun 20, 2017

Is there any update update this issue guys?

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

2 participants