fix: preserve list context and nested CSS decoration behavior
This commit is contained in:
@@ -152,13 +152,15 @@ def test_nested_quoted_lists_keep_depth_numbering_and_emphasis(tmp_path,engine):
|
||||
values={}
|
||||
for p in effective_document(doc,styles).iter(W+'p'):
|
||||
text=''.join(p.itertext()); props=p.find(W+'pPr')
|
||||
values[text]=props.find(W+'ind').get(W+'leftChars')
|
||||
# Absolute indents are needed when the quote and list use different
|
||||
# font sizes. Compare the resulting distance, not its storage unit.
|
||||
values[text]=int(props.find(W+'ind').get(W+'left'))
|
||||
assert props.find(W+'numPr') is not None
|
||||
if text in ('OuterQuote','NestedQuote'):
|
||||
run=next(r for r in p.iter(W+'r') if ''.join(r.itertext())==text)
|
||||
assert run.find('w:rPr/w:b',NS).get(W+'val')=='1'
|
||||
assert run.find('w:rPr/w:color',NS).get(W+'val')=='ff0000'
|
||||
assert int(values['NestedQuote'])>int(values['OuterQuote'])
|
||||
assert values['NestedQuote']-values['OuterQuote']==36*20
|
||||
|
||||
|
||||
def test_graphical_quote_edit_overrides_important_broad_p(qt_application,tmp_path):
|
||||
|
||||
Reference in New Issue
Block a user