# Path: panflute/elements.py
# class ListItem(Element):
#     """List item (contained in bullet lists and ordered lists)
# 
#     :param args: List item
#     :type args: :class:`Block`
#     :Base: :class:`Element`
#      """
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, Block)
# 
#     def to_json(self):
#         return self.content.to_json()
# 
# class Para(Block):
#     """Paragraph
# 
#     :param args: contents of the paragraph
#     :type args: :class:`Inline`
#     :Base: :class:`Block`
# 
#     :Example:
# 
#         >>> content = [Str('Some'), Space, Emph(Str('words.'))]
#         >>> para1 = Para(*content)
#         >>> para2 = Para(Str('More'), Space, Str('words.'))
#     """
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, Inline)
# 
#     def _slots_to_json(self):
#         return self.content.to_json()
# 
# class Strong(Inline):
#     """Strongly emphasized text
# 
#     :param args: elements that will be emphasized
#     :type args: :class:`Inline`
#     :Base: :class:`Inline`
#      """
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, Inline)
# 
#     def _slots_to_json(self):
#         return self.content.to_json()
# 
# class BulletList(Block):
#     """Bullet list (unordered list)
# 
#     :param args: List item
#     :type args: :class:`ListItem` | ``list``
#     :Base: :class:`Block`
#      """
# 
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, ListItem)
# 
#     def _slots_to_json(self):
#         return self.content.to_json()
# 
# class DefinitionList(Block):
#     """Definition list: list of definition items; basically (term, definition)
#     tuples.
# 
#     Each list item represents a pair of i) a term
#     (a list of inlines) and ii) one or more definitions (each a list of blocks)
# 
#     Example:
# 
#         >>> term1 = [Str('Spam')]
#         >>> def1 = Definition(Para(Str('...emails')))
#         >>> def2 = Definition(Para(Str('...meat')))
#         >>> spam = DefinitionItem(term1, [def1, def2])
#         >>>
#         >>> term2 = [Str('Spanish'), Space, Str('Inquisition')]
#         >>> def3 = Definition(Para(Str('church'), Space, Str('court')))
#         >>> inquisition = DefinitionItem(term=term2, definitions=[def3])
#         >>> definition_list = DefinitionList(spam, inquisition)
# 
#     :param args: Definition items (a term with definitions)
#     :type args: :class:`DefinitionItem`
#     :Base: :class:`Block`
#      """
# 
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, DefinitionItem)
# 
#     def _slots_to_json(self):
#         return self.content.to_json()
# 
# Path: panflute/io.py
# def toJSONFilter(*args, **kwargs):
#     """
#     Wrapper for :func:`.run_filter`, which calls :func:`.run_filters`
# 
#     toJSONFilter(action, prepare=None, finalize=None, input_stream=None, output_stream=None, \*\*kwargs)
#     Receive a Pandoc document from stdin, apply the *action* function to each element, and write it back to stdout.
# 
#     See also :func:`.toJSONFilters`
#     """
#     return run_filter(*args, **kwargs)


from panflute import toJSONFilter, DefinitionList, BulletList, ListItem, Para, Strong
#!/usr/bin/env python

"""
Pandoc filter to convert definition lists to bullet
lists with the defined terms in strong emphasis (for
compatibility with standard markdown).
"""



def deflists(elem, doc):

# Path: panflute/elements.py
# class ListItem(Element):
#     """List item (contained in bullet lists and ordered lists)
# 
#     :param args: List item
#     :type args: :class:`Block`
#     :Base: :class:`Element`
#      """
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, Block)
# 
#     def to_json(self):
#         return self.content.to_json()
# 
# class Para(Block):
#     """Paragraph
# 
#     :param args: contents of the paragraph
#     :type args: :class:`Inline`
#     :Base: :class:`Block`
# 
#     :Example:
# 
#         >>> content = [Str('Some'), Space, Emph(Str('words.'))]
#         >>> para1 = Para(*content)
#         >>> para2 = Para(Str('More'), Space, Str('words.'))
#     """
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, Inline)
# 
#     def _slots_to_json(self):
#         return self.content.to_json()
# 
# class Strong(Inline):
#     """Strongly emphasized text
# 
#     :param args: elements that will be emphasized
#     :type args: :class:`Inline`
#     :Base: :class:`Inline`
#      """
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, Inline)
# 
#     def _slots_to_json(self):
#         return self.content.to_json()
# 
# class BulletList(Block):
#     """Bullet list (unordered list)
# 
#     :param args: List item
#     :type args: :class:`ListItem` | ``list``
#     :Base: :class:`Block`
#      """
# 
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, ListItem)
# 
#     def _slots_to_json(self):
#         return self.content.to_json()
# 
# class DefinitionList(Block):
#     """Definition list: list of definition items; basically (term, definition)
#     tuples.
# 
#     Each list item represents a pair of i) a term
#     (a list of inlines) and ii) one or more definitions (each a list of blocks)
# 
#     Example:
# 
#         >>> term1 = [Str('Spam')]
#         >>> def1 = Definition(Para(Str('...emails')))
#         >>> def2 = Definition(Para(Str('...meat')))
#         >>> spam = DefinitionItem(term1, [def1, def2])
#         >>>
#         >>> term2 = [Str('Spanish'), Space, Str('Inquisition')]
#         >>> def3 = Definition(Para(Str('church'), Space, Str('court')))
#         >>> inquisition = DefinitionItem(term=term2, definitions=[def3])
#         >>> definition_list = DefinitionList(spam, inquisition)
# 
#     :param args: Definition items (a term with definitions)
#     :type args: :class:`DefinitionItem`
#     :Base: :class:`Block`
#      """
# 
#     __slots__ = ['_content']
#     _children = ['content']
# 
#     def __init__(self, *args):
#         self._set_content(args, DefinitionItem)
# 
#     def _slots_to_json(self):
#         return self.content.to_json()
# 
# Path: panflute/io.py
# def toJSONFilter(*args, **kwargs):
#     """
#     Wrapper for :func:`.run_filter`, which calls :func:`.run_filters`
# 
#     toJSONFilter(action, prepare=None, finalize=None, input_stream=None, output_stream=None, \*\*kwargs)
#     Receive a Pandoc document from stdin, apply the *action* function to each element, and write it back to stdout.
# 
#     See also :func:`.toJSONFilters`
#     """
#     return run_filter(*args, **kwargs)


# Path: examples/panflute/deflists.py
from panflute import toJSONFilter, DefinitionList, BulletList, ListItem, Para, Strong

#!/usr/bin/env python

"""
Pandoc filter to convert definition lists to bullet
lists with the defined terms in strong emphasis (for
compatibility with standard markdown).
"""



def deflists(elem, doc):

    if type(elem) == DefinitionList: