Skip to content

Regression: panflute.elements.builtin2meta no longer supports subclasses of builtins #166

@dhimmel

Description

@dhimmel

a72ffb5 was first released in 2.0.3. It breaks support for converting subclasses of builtin types to pandoc meta types. This is because it stops using isinstance and directly compares type instead. CC @ickc

This caused the issue mentioned at manubot/rootstock#386 (comment) and #164 (comment):

  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/panflute/containers.py", line 76, in insert
    v = check_type(v, self.oktypes)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/panflute/utils.py", line 71, in check_type
    raise TypeError(msg)
TypeError: 

Element "MetaList" received "CSL_Item" but expected <class 'panflute.base.MetaValue'>

CSL_Item is a dict subclass.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions