From 85f99611c84cf0853200fb358f135160c063b690 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 18 May 2017 19:52:04 +0100 Subject: Add anchor on hyperlinks as fragment if present --- mammoth/compat.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 mammoth/compat.py (limited to 'mammoth/compat.py') diff --git a/mammoth/compat.py b/mammoth/compat.py new file mode 100644 index 0000000..5fb9acf --- /dev/null +++ b/mammoth/compat.py @@ -0,0 +1,9 @@ +import sys + +if sys.version_info < (3, ): + from urlparse import urldefrag +else: + from urllib.parse import urldefrag + + +__all__ = ["urldefrag"] -- cgit v1.2.3