diff --git a/tools/filters/blockquote2div.py b/tools/filters/blockquote2div.py index 6797c86472c92a6526d6f572d0d424f9b2a24638..c583e83a49845e5687469455971f782aac380fb1 100755 --- a/tools/filters/blockquote2div.py +++ b/tools/filters/blockquote2div.py @@ -104,12 +104,11 @@ def blockquote2div(key, value, format, meta): id, classes, kvs = attr - ltitle = pf.stringify(inlines).lower() - if ltitle in SPECIAL_TITLES: - classes.append(SPECIAL_TITLES[ltitle]) - return pf.Div(attr, blockquote) + lowercase_title = pf.stringify(inlines).lower() + if lowercase_title in SPECIAL_TITLES: + classes.append(SPECIAL_TITLES[lowercase_title]) - elif len(classes) == 1 and classes[0] in SPECIAL_CLASSES: + if len(classes) == 1 and classes[0] in SPECIAL_CLASSES: remove_attributes(blockquote) # a blockquote is just a list of blocks, so it can be # passed directly to Div, which expects Div(attr, blocks)