From e3250c2f7b916daf54656b0489f78e4cd1d6206c Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 28 Mar 2016 12:40:13 +0100 Subject: Default the ID prefix to the empty string --- NEWS | 3 +++ mammoth/conversion.py | 3 +-- 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) -- cgit v1.2.3