aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-03-28 12:40:13 +0100
committerMichael Williamson <mike@zwobble.org>2016-03-28 13:29:03 +0100
commite3250c2f7b916daf54656b0489f78e4cd1d6206c (patch)
treedb0b2083cecfe47f575ff137097526343e90227d
parentd7ef4498635c54fa127348d564a8127d4aa40b51 (diff)
Default the ID prefix to the empty string
-rw-r--r--NEWS3
-rw-r--r--mammoth/conversion.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 191b77b..2bd3361 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@
* Remove deprecated convert_underline argument.
+* The default ID prefix is now the empty string rather than a random number
+ followed by a hyphen.
+
# 0.3.31
* Improve collapsing of similar non-fresh HTML elements.
diff --git a/mammoth/conversion.py b/mammoth/conversion.py
index e1e7550..8a5766c 100644
--- a/mammoth/conversion.py
+++ b/mammoth/conversion.py
@@ -3,7 +3,6 @@
from __future__ import unicode_literals
import base64
-import random
from . import documents, results, html_paths, images, writers, html, lists
from .docx.files import InvalidFileReferenceError
@@ -20,7 +19,7 @@ def convert_document_element_to_html(element,
style_map = []
if id_prefix is None:
- id_prefix = str(random.randint(0, 1000000000000000))
+ id_prefix = ""
if convert_image is None:
convert_image = images.inline(_generate_image_attributes)