X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/30e68368555ff801a645746dfe9edc7aa39a70ff..8287173da88bfaa3a8b90a39768198dceba2e25f:/librarian/formats/pdf/__init__.py?ds=sidebyside diff --git a/librarian/formats/pdf/__init__.py b/librarian/formats/pdf/__init__.py index 7d170b9..a994008 100644 --- a/librarian/formats/pdf/__init__.py +++ b/librarian/formats/pdf/__init__.py @@ -73,6 +73,8 @@ class PdfFormat(Format): if url.startswith('/'): url = 'http://milpeer.eu' + url + if '.' not in url: + raise BuildError('Linked file without extension: %s' % url) ext = url.rsplit('.', 1)[-1] if image: urlretrieve(url, save_as + '_.' + ext) @@ -347,6 +349,7 @@ PdfFormat.renderers.register(core.Div, 'video', VideoRenderer('par')) PdfFormat.renderers.register(core.Div, 'defined', CmdRenderer('textbf')) PdfFormat.renderers.register(core.Div, 'item', CmdRenderer('item')) +PdfFormat.renderers.register(core.Span, 'item', CmdRenderer('item')) PdfFormat.renderers.register(core.Div, 'list', EnvRenderer('itemize')) PdfFormat.renderers.register(core.Div, 'list.enum', EnvRenderer('enumerate'))