mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Leigh's latest changes.
This commit is contained in:
parent
5ac915b416
commit
d6ec680ebb
@ -792,6 +792,7 @@ class Textile(object):
|
|||||||
text = self.noTextile(text)
|
text = self.noTextile(text)
|
||||||
text = self.code(text)
|
text = self.code(text)
|
||||||
|
|
||||||
|
text = self.glyphs(text)
|
||||||
text = self.links(text)
|
text = self.links(text)
|
||||||
|
|
||||||
if not self.noimage:
|
if not self.noimage:
|
||||||
@ -803,7 +804,6 @@ class Textile(object):
|
|||||||
|
|
||||||
text = self.span(text)
|
text = self.span(text)
|
||||||
text = self.footnoteRef(text)
|
text = self.footnoteRef(text)
|
||||||
text = self.glyphs(text)
|
|
||||||
|
|
||||||
return text.rstrip('\n')
|
return text.rstrip('\n')
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@ class TextileMLizer(OEB2HTML):
|
|||||||
txt = '%s' % t
|
txt = '%s' % t
|
||||||
if txt != '%':
|
if txt != '%':
|
||||||
text = re.sub(r'([^'+t+'|^\n])'+t+t+'([^'+t+'])', r'\1\2', text)
|
text = re.sub(r'([^'+t+'|^\n])'+t+t+'([^'+t+'])', r'\1\2', text)
|
||||||
text = re.sub(r'(\w)('+t+'\w+'+t+')', r'\1[\2]', text)
|
text = re.sub(r'([a-zA-Z0-9\'"\-])('+t+'[a-zA-Z0-9\'"!? ,.\-]+'+t+')', r'\1[\2]', text)
|
||||||
text = re.sub(r'('+t+'\w+'+t+')(\w)', r'[\1]\2', text)
|
text = re.sub(r'('+t+'[a-zA-Z0-9\'"!? ,.\-]+'+t+')([a-zA-Z0-9\'"!?\-])', r'[\1]\2', text)
|
||||||
return text
|
return text
|
||||||
|
|
||||||
# Now tidyup links and ids - remove ones that don't have a correponding opposite
|
# Now tidyup links and ids - remove ones that don't have a correponding opposite
|
||||||
|
Loading…
x
Reference in New Issue
Block a user