From dcce547e449e9311c959e8e06fce1a154f19ac6c Mon Sep 17 00:00:00 2001 From: rupor Date: Mon, 8 May 2017 15:17:36 -0400 Subject: [PATCH] Flex "inline" note style a bit - allow css formatting. Fixes for dropcap processing --- modules/fb2html.py | 4 ++-- profiles/default.css | 8 ++++++++ version.py | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/fb2html.py b/modules/fb2html.py index 7795d69..9fb2b34 100644 --- a/modules/fb2html.py +++ b/modules/fb2html.py @@ -822,7 +822,7 @@ def parse_format(self, elem, tag=None, css=None, href=None): page = self.pages_list[self.current_file] text = '' for w in elem.text.split(' '): - text = ' '.join([text, w]) + text = w if text == '' else ' '.join([text, w]) if self.page_length + len(text) >= self.characters_per_page: hs = self.insert_hyphenation(text) if dodropcaps > 0: @@ -916,7 +916,7 @@ def parse_format(self, elem, tag=None, css=None, href=None): if self.current_notes: if self.notes_mode == 'inline' and tag == 'span': - self.buff.append('[{0}]'.format(save_html(self.insert_hyphenation(''.join(self.current_notes[0][1]))))) + self.buff.append('{0}'.format(save_html(self.insert_hyphenation(''.join(self.current_notes[0][1]))))) self.current_notes = [] elif self.notes_mode == 'block' and tag == 'p': self.buff.append('
') diff --git a/profiles/default.css b/profiles/default.css index c527bbb..883e4b3 100644 --- a/profiles/default.css +++ b/profiles/default.css @@ -217,6 +217,14 @@ p.title { color: #6e6e6e; } +.inlinenote::before { + content: "["; +} + +.inlinenote::after { + content: "]"; +} + .blocknote { font-style: italic; font-size: 80%; diff --git a/version.py b/version.py index a023382..786829d 100644 --- a/version.py +++ b/version.py @@ -4,4 +4,4 @@ WINDOWS = platform.system().lower() == "windows" -VERSION = u'3.6.18' +VERSION = u'3.6.19'