Inline images parsing in python 3 fix