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

Commit

Permalink
Fixing dropcap processing - first line only
Browse files Browse the repository at this point in the history
  • Loading branch information
rupor-github committed May 10, 2017
1 parent dcce547 commit 190a17b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fb2mobi.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<logLevel>DEBUG</logLevel>
<outputFormat>mobi</outputFormat>
<kindleCompressionLevel>1</kindleCompressionLevel>
<noDropcapsSymbols>'"-.…0123456789‒–—«»</noDropcapsSymbols>
<noDropcapsSymbols>'"-.…0123456789‒–—«»“”</noDropcapsSymbols>
<transliterate>False</transliterate>
<noMOBIoptimization>False</noMOBIoptimization>
<!-- Voyage, PW3, Aura -->
Expand Down
6 changes: 3 additions & 3 deletions modules/fb2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,8 @@ def parse_format(self, elem, tag=None, css=None, href=None):

if elem.text:
# Обработка dropcaps
if self.first_chapter_line and not (self.header or self.subheader) and tag == 'p' and not self.body_name:
if not self.no_paragraph:
if self.first_chapter_line and not (self.header or self.subheader or self.body_name or self.no_paragraph):
if tag == 'p':
if self.dropcaps == 'simple':
if elem.text[0] not in self.nodropcaps:
dodropcaps = 1
Expand All @@ -779,7 +779,7 @@ def parse_format(self, elem, tag=None, css=None, href=None):
dodropcaps = i + 1
css = 'dropcaps'
break
self.first_chapter_line = False
self.first_chapter_line = False

if self.notes_mode in ('inline', 'block') and tag == 'a':
note_id = href[1:]
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

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

VERSION = u'3.6.19'
VERSION = u'3.6.20'

0 comments on commit 190a17b

Please sign in to comment.