bmcorser / fontawesome-markdown

Markdown extension to use Font Awesome icons in a GitHub style
http://bmcorser.github.io/fontawesome-markdown/
45 stars 24 forks source link

Python 3, avoid list that can get out-of-date. #2

Closed ghost closed 9 years ago

ghost commented 9 years ago

The old version didn't work in Python 3, and I decided that keeping a list of icons was a bad idea because it was already out-of-date.

bmcorser commented 9 years ago

Sorry for being unresponsive, @Undeterminant.

I think I wanted to use the hardcoded list to catch typos, which happens with 451e18e1fe6b121a16e93e762db82f85019fb4a6, please see the relevant test. I've also added a script to update the icon list from FontAwesome's GitHub account, so when they add changes it should be easy to keep this lib up to date.

Would love to see Python 3 support, but probably using tox to manage things. If you want to invest the time, please do :+1:

bmcorser commented 9 years ago

PS: The above changes are available on PyPI for your happy consumption :)

ghost commented 9 years ago

I actually closed this because I realised that deleting half of the code wasn't really a good idea for a pull request. And in terms of supporting Python 3, it's really simple, because all that you have to do is add:

from __future__ import absolute_import
from __future__ import unicode_literals

to the top of the files, because Markdown already supports Python 3. But thank you for the changes!