mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-03 14:35:20 +02:00
...
This commit is contained in:
parent
466383c519
commit
41520c443d
1 changed files with 2 additions and 0 deletions
|
|
@ -145,6 +145,8 @@ def init_from_template(self, template):
|
|||
self.editor.load_text(template, syntax=self.syntax, process_template=True)
|
||||
|
||||
def get_raw_data(self):
|
||||
# The EPUB spec requires NFC normalization, see section 1.3.6 of
|
||||
# http://www.idpf.org/epub/20/spec/OPS_2.0.1_draft.htm
|
||||
return unicodedata.normalize('NFC', unicode(self.editor.toPlainText()).rstrip('\0'))
|
||||
|
||||
def replace_data(self, raw, only_if_different=True):
|
||||
|
|
|
|||
Loading…
Reference in a new issue