Skip to content
This repository has been archived by the owner on Mar 15, 2020. It is now read-only.

Commit

Permalink
Flex "inline" note style a bit - allow css formatting. Fixes for drop…
Browse files Browse the repository at this point in the history
…cap processing
  • Loading branch information
rupor-github committed May 8, 2017
1 parent 57ba746 commit dcce547
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/fb2html.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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('<span class="inlinenote">[{0}]</span>'.format(save_html(self.insert_hyphenation(''.join(self.current_notes[0][1])))))
self.buff.append('<span class="inlinenote">{0}</span>'.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('<div class="blocknote">')
Expand Down
8 changes: 8 additions & 0 deletions profiles/default.css
Expand Up @@ -217,6 +217,14 @@ p.title {
color: #6e6e6e;
}

.inlinenote::before {
content: "[";
}

.inlinenote::after {
content: "]";
}

.blocknote {
font-style: italic;
font-size: 80%;
Expand Down
2 changes: 1 addition & 1 deletion version.py
Expand Up @@ -4,4 +4,4 @@

WINDOWS = platform.system().lower() == "windows"

VERSION = u'3.6.18'
VERSION = u'3.6.19'

0 comments on commit dcce547

Please sign in to comment.