Skip to content

Commit

Permalink
Merge pull request #124 from theSage21/master
Browse files Browse the repository at this point in the history
Fix for  #106
  • Loading branch information
Alir3z4 committed Apr 1, 2016
2 parents b7a78b8 + 82aec92 commit e635455
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=========
----

* Fix #106: encoding by stdin
* Fix #89: Python 3.5 support.
* Fix #113: inplace baseurl substitution for <a> and <img> tags.
* Feature #118: Update the badges to badge.kloud51.com
Expand Down
9 changes: 5 additions & 4 deletions html2text/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,13 @@ class bcolors: # pragma: no cover

# process input
encoding = "utf-8"
if len(args) == 2:
encoding = args[1]
elif len(args) > 2:
p.error('Too many arguments')

if len(args) > 0 and args[0] != '-': # pragma: no cover
file_ = args[0]
if len(args) == 2:
encoding = args[1]
if len(args) > 2:
p.error('Too many arguments')

if file_.startswith('http://') or file_.startswith('https://'):
baseurl = file_
Expand Down

0 comments on commit e635455

Please sign in to comment.