Skip to content

Commit

Permalink
Merge pull request #28 from mihaip/master
Browse files Browse the repository at this point in the history
Add support for strikethrough in the RTF reader.
  • Loading branch information
brendonh committed Aug 20, 2014
2 parents cc05989 + 91f8ace commit 4dd7c2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyth/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Text(_PythBase):
They do not inherit their properties from anything.
"""

validProperties = ('bold', 'italic', 'underline', 'url', 'sub', 'super')
validProperties = ('bold', 'italic', 'underline', 'url', 'sub', 'super', 'strike')
contentType = unicode

def __repr__(self):
Expand Down
5 changes: 5 additions & 0 deletions pyth/plugins/rtf15/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,11 @@ def handle_ul(self, onOff=None):
self.content.append(ReadableMarker("underline", val))


def handle_strike(self, onOff=None):
val = onOff in (None, "", "1")
self.content.append(ReadableMarker("strike", val))


def handle_ilvl(self, level):
if self.currentParaTag is not None:
self.currentParaTag.listLevel = level
Expand Down

0 comments on commit 4dd7c2b

Please sign in to comment.