Ejemplo n.º 1
0
 def run(self):
     if not self.arguments:
         return []
     subnode = addnodes.centered()
     inodes, messages = self.state.inline_text(self.arguments[0],
                                               self.lineno)
     subnode.extend(inodes)
     return [subnode] + messages
Ejemplo n.º 2
0
 def run(self):
     if not self.arguments:
         return []
     subnode = addnodes.centered()
     inodes, messages = self.state.inline_text(self.arguments[0],
                                               self.lineno)
     subnode.extend(inodes)
     return [subnode] + messages
Ejemplo n.º 3
0
def centered_directive(name, arguments, options, content, lineno,
                       content_offset, block_text, state, state_machine):
    if not arguments:
        return []
    subnode = addnodes.centered()
    inodes, messages = state.inline_text(arguments[0], lineno)
    subnode.extend(inodes)
    return [subnode] + messages
Ejemplo n.º 4
0
def centered_directive(name, arguments, options, content, lineno,
                       content_offset, block_text, state, state_machine):
    if not arguments:
        return []
    subnode = addnodes.centered()
    inodes, messages = state.inline_text(arguments[0], lineno)
    subnode.extend(inodes)
    return [subnode] + messages
Ejemplo n.º 5
0
 def run(self):
     # type: () -> List[N_co]
     if not self.arguments:
         return []
     subnode = addnodes.centered()  # type: nodes.Element
     inodes, messages = self.state.inline_text(self.arguments[0],
                                               self.lineno)
     subnode.extend(inodes)
     return [subnode] + messages
Ejemplo n.º 6
0
 def run(self):
     # type: () -> List[nodes.Node]
     if not self.arguments:
         return []
     subnode = addnodes.centered()  # type: nodes.Node
     inodes, messages = self.state.inline_text(self.arguments[0],
                                               self.lineno)
     subnode.extend(inodes)
     return [subnode] + messages
Ejemplo n.º 7
0
    def run(self) -> List[Node]:
        if not self.arguments:
            return []
        subnode = addnodes.centered()  # type: Element
        inodes, messages = self.state.inline_text(self.arguments[0], self.lineno)
        subnode.extend(inodes)

        ret = [subnode]  # type: List[Node]
        ret += messages
        return ret