Skip to content

Commit d77f99c

Browse files
committed
Merge pull request aaronsw#104 from theSage21/master
As per aaronsw#103, strikethroughs rendered with ~~ Fixes aaronsw#103
2 parents 1df8fae + 46079ef commit d77f99c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

ChangeLog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
0000.00.00
2+
=========
3+
----
4+
5+
* <s>, <strike>, <del> now rendered as ~~text~~
6+
17
2015.11.4
28
=========
39
----

html2text/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,9 @@ def handle_tag(self, tag, attrs, start):
365365
self.o(self.strong_mark)
366366
if tag in ['del', 'strike', 's']:
367367
if start:
368-
self.o("<" + tag + ">")
368+
self.o('~~')
369369
else:
370-
self.o("</" + tag + ">")
370+
self.o('~~')
371371

372372
if self.google_doc:
373373
if not self.inheader:

test/decript_tage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<del>something</del> <strike>something</strike> <s>something</s>
1+
~~something~~ ~~something~~ ~~something~~
22

0 commit comments

Comments
 (0)