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
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
PyTextile
|
PyTextile
|
||||||
|
|
||||||
@ -206,6 +208,12 @@ class Textile(object):
|
|||||||
(re.compile(r'{clubs?}'), r'♣'), # club
|
(re.compile(r'{clubs?}'), r'♣'), # club
|
||||||
(re.compile(r'{hearts?}'), r'♥'), # heart
|
(re.compile(r'{hearts?}'), r'♥'), # heart
|
||||||
(re.compile(r'{diam(onds?|s)}'), r'♦'), # diamond
|
(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 = [
|
glyph_defaults = [
|
||||||
(re.compile(r'(\d+\'?\"?)( ?)x( ?)(?=\d+)'), r'\1\2×\3'), # dimension sign
|
(re.compile(r'(\d+\'?\"?)( ?)x( ?)(?=\d+)'), r'\1\2×\3'), # dimension sign
|
||||||
|
@ -165,7 +165,7 @@ class TXTInput(InputFormatPlugin):
|
|||||||
elif options.formatting_type == 'textile':
|
elif options.formatting_type == 'textile':
|
||||||
log.debug('Running text through textile conversion...')
|
log.debug('Running text through textile conversion...')
|
||||||
html = convert_textile(txt)
|
html = convert_textile(txt)
|
||||||
setattr(options, 'smarten_punctuation', True)
|
#setattr(options, 'smarten_punctuation', True)
|
||||||
else:
|
else:
|
||||||
log.debug('Running text through basic conversion...')
|
log.debug('Running text through basic conversion...')
|
||||||
flow_size = getattr(options, 'flow_size', 0)
|
flow_size = getattr(options, 'flow_size', 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user