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

Link build with $ sign without "http" prefix broken. #51

Closed
Madalosso opened this issue Jul 25, 2017 · 3 comments
Closed

Link build with $ sign without "http" prefix broken. #51

Madalosso opened this issue Jul 25, 2017 · 3 comments

Comments

@Madalosso
Copy link

textile('"$":www.google.com.br') raise a IndexError.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vagrant/.virtualenvs/jbl-web/local/lib/python2.7/site-packages/textile/core.py", line 1412, in textile
    return Textile(html_type=html_type).parse(text)
  File "/home/vagrant/.virtualenvs/jbl-web/local/lib/python2.7/site-packages/textile/core.py", line 248, in parse
    text = self.block(text)
  File "/home/vagrant/.virtualenvs/jbl-web/local/lib/python2.7/site-packages/textile/core.py", line 499, in block
    block = Block(self, tag, atts, ext, cite, line)
  File "/home/vagrant/.virtualenvs/jbl-web/local/lib/python2.7/site-packages/textile/objects/block.py", line 32, in __init__
    self.process()
  File "/home/vagrant/.virtualenvs/jbl-web/local/lib/python2.7/site-packages/textile/objects/block.py", line 125, in process
    self.content = self.textile.graf(self.content)
  File "/home/vagrant/.virtualenvs/jbl-web/local/lib/python2.7/site-packages/textile/core.py", line 635, in graf
    text = self.links(text)
  File "/home/vagrant/.virtualenvs/jbl-web/local/lib/python2.7/site-packages/textile/core.py", line 658, in links
    return self.replaceLinks(text)
  File "/home/vagrant/.virtualenvs/jbl-web/local/lib/python2.7/site-packages/textile/core.py", line 774, in replaceLinks
    text = re.compile(pattern, flags=re.X | re.U).sub(self.fLink, text)
  File "/home/vagrant/.virtualenvs/jbl-web/local/lib/python2.7/site-packages/textile/core.py", line 921, in fLink
    text = text.split(":")[1]
IndexError: list index out of range

I believe it's a issue since it works fine on textile sandbox
https://txstyle.org/doc/12/links

ikirudennis added a commit that referenced this issue Jul 25, 2017
@Madalosso
Copy link
Author

wow, that was fast 👍

@ikirudennis
Copy link
Member

That's what good bug reports deserve. That being said, I think I'm going to start waiting a week or two after fixing a bug to post the fix on PyPI. I've been churning through versions lately, and maybe I should slow down just a little bit. In the meantime, you can install a version with the fix via: pip install git+https://github.com/textile/python-textile.git@develop#egg=textile
Thanks for a clear and concise bug report.

@ikirudennis
Copy link
Member

Release 2.3.16 fixes this.

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