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

Table build without space after aligment raise a AttributeError. #52

Closed
tynopet opened this issue Aug 9, 2017 · 2 comments
Closed

Table build without space after aligment raise a AttributeError. #52

tynopet opened this issue Aug 9, 2017 · 2 comments

Comments

@tynopet
Copy link

tynopet commented Aug 9, 2017

textile('|=.First Header |=. Second Header |') raise a AttributeError.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dmitry/.local/lib/python2.7/site-packages/textile/core.py", line 1412, in textile
    return Textile(html_type=html_type).parse(text)
  File "/home/dmitry/.local/lib/python2.7/site-packages/textile/core.py", line 248, in parse
    text = self.block(text)
  File "/home/dmitry/.local/lib/python2.7/site-packages/textile/core.py", line 499, in block
    block = Block(self, tag, atts, ext, cite, line)
  File "/home/dmitry/.local/lib/python2.7/site-packages/textile/objects/block.py", line 32, in __init__
    self.process()
  File "/home/dmitry/.local/lib/python2.7/site-packages/textile/objects/block.py", line 125, in process
    self.content = self.textile.graf(self.content)
  File "/home/dmitry/.local/lib/python2.7/site-packages/textile/core.py", line 641, in graf
    text = self.table(text)
  File "/home/dmitry/.local/lib/python2.7/site-packages/textile/core.py", line 291, in table
    return table.process()
  File "/home/dmitry/.local/lib/python2.7/site-packages/textile/objects/table.py", line 45, in process
    caption = Caption(**cmtch.groupdict())
AttributeError: 'NoneType' object has no attribute 'groupdict'

Expected output (from textile sandbox):

<table>
		<tr>
			<td>=.<strong>First Header</strong> </td>
			<td style="text-align:center;">Second Header </td>
		</tr>
</table>
@ikirudennis
Copy link
Member

Hi, @tynopet. I'm not getting the <strong> tags from txstyle.org, so the output you'll get won't match exact what you expected above. But at least it won't crash.

@tynopet
Copy link
Author

tynopet commented Aug 10, 2017

Oh, I'm sorry, I copying and paste the output from textile('|=.*First Header* |=. Second Header |') by mistake. Thank you for fast fixed.

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