Leigh's latest changes.

This commit is contained in:
John Schember 2011-05-09 06:43:19 -04:00
parent 5ac915b416
commit d6ec680ebb
2 changed files with 3 additions and 3 deletions

View File

@ -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')

View File

@ -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