From 376df1781c0579929067d5eb884679905fa9f220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 7 May 2014 15:13:29 +0200 Subject: [PATCH] odf2legi: basic handling of hypertext links (#4798) --- odf2legi/odf2legi.py | 2 +- odf2legi/tests.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/odf2legi/odf2legi.py b/odf2legi/odf2legi.py index 12b307a..21b5ac1 100644 --- a/odf2legi/odf2legi.py +++ b/odf2legi/odf2legi.py @@ -289,7 +289,7 @@ def fill_inline(para, elem, invert_bg=False): # Microsoft Word fill_inline(para, child) else: - print >> sys.stderr, 'W: got text:a, with an external reference' + handle_little_span(para, child, False) elif child.tag == '{%s}note' % TEXT_NS: footnote = ET.Element('footnote') diff --git a/odf2legi/tests.py b/odf2legi/tests.py index 337d1e1..bc78370 100644 --- a/odf2legi/tests.py +++ b/odf2legi/tests.py @@ -154,6 +154,16 @@ Plop self.assertEqual(self.convert_to_legi(doc), '''FooBar. Baz''') + def test_inline_with_link(self): + odf2legi.STYLES = {} + doc = '''\ + +Plop foobar@example.net plop +''' + self.assertEqual(self.convert_to_legi(doc), '''Plop foobar@example.net plop\n''') + class TableTestCase(unittest.TestCase):