From 7026a360dbd6e00cbe0e738906da285f3cee902c Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 22 Feb 2017 21:51:33 +0000 Subject: [PATCH] protect spaces --- sourcing/edl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sourcing/edl.py b/sourcing/edl.py index 6a28075..de94337 100644 --- a/sourcing/edl.py +++ b/sourcing/edl.py @@ -2,6 +2,7 @@ from .url import get_url, get_text from .parse import get_span, parse_span, parse_link, parse_sourcedoc_facet, xanadoc_span_html, span_html, get_urls from collections import defaultdict from html import escape +from .utils import protect_start_spaces import re @@ -105,7 +106,7 @@ def fulfil_edl_with_sources(edl_text): doc = ''.join(doc_spans) for s in source: - text = s.pop('text') + text = protect_start_spaces(s.pop('text')) if s['length'] > max_sourcedoc_size: # print('{} > {}'.format(s['length'], max_sourcedoc_size)) continue