示例#1
0
def acks_directive(name, arguments, options, content, lineno,
                   content_offset, block_text, state, state_machine):
    node = addnodes.acks()
    state.nested_parse(content, content_offset, node)
    if len(node.children) != 1 or not isinstance(node.children[0], nodes.bullet_list):
        return [state.document.reporter.warning('.. acks content is not a list',
                                                line=lineno)]
    return [node]
示例#2
0
文件: other.py 项目: wiless/IMTAphy
def acks_directive(name, arguments, options, content, lineno,
                   content_offset, block_text, state, state_machine):
    node = addnodes.acks()
    state.nested_parse(content, content_offset, node)
    if len(node.children) != 1 or not isinstance(node.children[0], nodes.bullet_list):
        return [state.document.reporter.warning('.. acks content is not a list',
                                                line=lineno)]
    return [node]
示例#3
0
 def run(self):
     node = addnodes.acks()
     node.document = self.state.document
     self.state.nested_parse(self.content, self.content_offset, node)
     if len(node.children) != 1 or not isinstance(node.children[0],
                                                  nodes.bullet_list):
         return [self.state.document.reporter.warning(
             '.. acks content is not a list', line=self.lineno)]
     return [node]
示例#4
0
 def run(self):
     node = addnodes.acks()
     node.document = self.state.document
     self.state.nested_parse(self.content, self.content_offset, node)
     if len(node.children) != 1 or not isinstance(node.children[0],
                                                  nodes.bullet_list):
         return [self.state.document.reporter.warning(
             '.. acks content is not a list', line=self.lineno)]
     return [node]
示例#5
0
 def run(self) -> List[Node]:
     node = addnodes.acks()
     node.document = self.state.document
     self.state.nested_parse(self.content, self.content_offset, node)
     if len(node.children) != 1 or not isinstance(node.children[0],
                                                  nodes.bullet_list):
         logger.warning(__('.. acks content is not a list'),
                        location=(self.env.docname, self.lineno))
         return []
     return [node]