mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
...
This commit is contained in:
parent
f27455e070
commit
093999d847
@ -114,11 +114,11 @@ class Convert(object):
|
|||||||
|
|
||||||
def convert_p(self, p):
|
def convert_p(self, p):
|
||||||
dest = P()
|
dest = P()
|
||||||
|
style = self.styles.resolve_paragraph(p)
|
||||||
for run in XPath('descendant::w:r')(p):
|
for run in XPath('descendant::w:r')(p):
|
||||||
span = self.convert_run(run)
|
span = self.convert_run(run)
|
||||||
dest.append(span)
|
dest.append(span)
|
||||||
|
|
||||||
style = self.styles.resolve_paragraph(p)
|
|
||||||
m = re.match(r'heading\s+(\d+)$', style.style_name or '', re.IGNORECASE)
|
m = re.match(r'heading\s+(\d+)$', style.style_name or '', re.IGNORECASE)
|
||||||
if m is not None:
|
if m is not None:
|
||||||
n = min(1, max(6, int(m.group(1))))
|
n = min(1, max(6, int(m.group(1))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user