Skip to content

Commit

Permalink
Preparing for 1.21 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ttscoff committed Jun 28, 2018
1 parent 00bce03 commit be5c501
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
### 1.20

* Update WebMarkdown
* Fix invisible characters in output

### 1.10

* Updated OpenURLS
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -3,7 +3,7 @@ Brett's PopClip Extensions

My growing collection of [PopClip][popclip] extensions.

_Current release version: **1.20** ([source code](https://github.com/ttscoff/popclipextensions/releases/tag/1.20))_
_Current release version: **1.21** ([source code](https://github.com/ttscoff/popclipextensions/releases/tag/1.21))_

## Installation

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.20
1.21
7 changes: 5 additions & 2 deletions WebMarkdown.popclipext/html2text
Expand Up @@ -100,6 +100,9 @@ def hn(tag):
if n in range(1, 10): return n
except ValueError: return 0

def clean_invisibles(line):
return re.sub(r'[\xc2\x99\xc2\x95\xc2\xa0]'," ",line)

def dumb_property_dict(style):
"""returns a hash of css attributes"""
return dict([(x.strip(), y.strip()) for x, y in [z.split(':', 1) for z in style.split(';') if ':' in z]]);
Expand Down Expand Up @@ -739,7 +742,7 @@ def wrapwrite(text):

def html2text(html, baseurl=''):
h = HTML2Text(baseurl=baseurl)
return h.handle(html)
return clean_invisibles(h.handle(html))

def unescape(s, unicode_snob=False):
h = HTML2Text()
Expand Down Expand Up @@ -816,7 +819,7 @@ def main():
h.hide_strikethrough = options.hide_strikethrough

# sys.stdout.write(h.handle(data))
wrapwrite(h.handle(data))
wrapwrite(clean_invisibles(h.handle(data)))


if __name__ == "__main__":
Expand Down

0 comments on commit be5c501

Please sign in to comment.