diff --git a/odf2legi/odf2legi.py b/odf2legi/odf2legi.py
index e5abef3..e1fe5c3 100644
--- a/odf2legi/odf2legi.py
+++ b/odf2legi/odf2legi.py
@@ -262,6 +262,7 @@ def fill_inline(para, elem, invert_bg=False):
for child in elem.getchildren():
if child.tag == '{%s}span' % TEXT_NS and child.getchildren():
fill_inline(para, child, invert_bg=invert_bg)
+ append_remaining_text(para, child.tail)
elif child.tag == '{%s}span' % TEXT_NS and not child.getchildren():
try:
@@ -295,6 +296,9 @@ def fill_inline(para, elem, invert_bg=False):
elif child.tag == '{%s}sequence' % TEXT_NS:
append_remaining_text(para, child.text, child.tail)
+ elif child.tag == '{%s}s' % TEXT_NS:
+ append_remaining_text(para, child.text, child.tail)
+
elif child.tag == '{%s}sequence-ref' % TEXT_NS:
xref = ET.Element('xref')
xref.attrib['linkend'] = child.attrib.get('{%s}ref-name' % TEXT_NS)
diff --git a/odf2legi/tests.py b/odf2legi/tests.py
index 86cc397..4288779 100644
--- a/odf2legi/tests.py
+++ b/odf2legi/tests.py
@@ -130,6 +130,20 @@ Plop
'''\nPlop\n''')
+ def test_footnotes_bug4254(self):
+ doc = '''\
+Foo
+2Bar. Baz
+'''
+
+ self.assertEqual(self.convert_to_legi(doc),
+ '''FooBar. Baz''')
+
+
+
class TableTestCase(unittest.TestCase):
def test_plain_table(self):
doc = '''\
@@ -859,6 +873,5 @@ M. Michu bla bla bla
odf2legi.convert_to_legi_xml(doc),
'''ChapterHelloWorld''')
-
if __name__ == '__main__':
unittest.main()