View Single Post
Old 09-05-2015, 03:01 PM   #17
gipsy
Connoisseur
gipsy began at the beginning.
 
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
The Fix for false line breaks doesn't work in greek language.

I use the following regex to fix the lines breaks.
Code:
Find: ([\p{Greek},'–’“”][</ib>]*)</p>\s+<p>([<ib>]*[\p{Greek},'–’“”])
Replace:\1 \2
I try to change the
Code:
	if allBreaks == 'Yes':
		CorrectText("Fixed false line breaks:", r'([a-z])</p>\s+<p[^>]*>([A-Z])', r'\1 \2')
with the in HTMLProcessor.py

Code:
	if allBreaks == 'Yes':
		CorrectText("Fixed false line breaks:", r'([\p{Greek}\,\'–’“”][</ib>]*)</p>\s+<p>([<ib>]*[\p{Greek},\'–’“”])', r'\1 \2')
but the lines doesn't combine
I don't know any python. Is my code ok?
Thanks
gipsy is offline   Reply With Quote