mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
commit
9f5508f921
@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
PyTextile
|
||||
|
||||
@ -206,6 +208,12 @@ class Textile(object):
|
||||
(re.compile(r'{clubs?}'), r'♣'), # club
|
||||
(re.compile(r'{hearts?}'), r'♥'), # heart
|
||||
(re.compile(r'{diam(onds?|s)}'), r'♦'), # diamond
|
||||
(re.compile(r'{"}'), r'"'), # double-quote
|
||||
(re.compile(r"{'}"), r'''), # single-quote
|
||||
(re.compile(r"{(’|'/|/')}"), r'’'), # closing-single-quote - apostrophe
|
||||
(re.compile(r"{(‘|\\'|'\\)}"), r'‘'), # opening-single-quote
|
||||
(re.compile(r'{(”|"/|/")}'), r'”'), # closing-double-quote
|
||||
(re.compile(r'{(“|\\"|"\\)}'), r'“'), # opening-double-quote
|
||||
]
|
||||
glyph_defaults = [
|
||||
(re.compile(r'(\d+\'?\"?)( ?)x( ?)(?=\d+)'), r'\1\2×\3'), # dimension sign
|
||||
|
@ -165,7 +165,7 @@ class TXTInput(InputFormatPlugin):
|
||||
elif options.formatting_type == 'textile':
|
||||
log.debug('Running text through textile conversion...')
|
||||
html = convert_textile(txt)
|
||||
setattr(options, 'smarten_punctuation', True)
|
||||
#setattr(options, 'smarten_punctuation', True)
|
||||
else:
|
||||
log.debug('Running text through basic conversion...')
|
||||
flow_size = getattr(options, 'flow_size', 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user