Compare commits

..

1 Commits

Author SHA1 Message Date
Sergio Martínez Portela
66d061dfda Expose #+BEGIN_ block arguments. 2022-11-15 21:11:05 +01:00
2 changed files with 3 additions and 2 deletions

View File

@ -89,11 +89,12 @@ class BlockNode:
class CodeBlock(BlockNode): class CodeBlock(BlockNode):
def __init__(self, header, subtype): def __init__(self, header, subtype, arguments):
super().__init__() super().__init__()
self.header = header self.header = header
self.lines = None self.lines = None
self.subtype = subtype self.subtype = subtype
self.arguments = arguments
def set_lines(self, lines): def set_lines(self, lines):
self.lines = lines self.lines = lines

View File

@ -481,7 +481,7 @@ class Headline:
and line.delimiter_type == DelimiterLineType.BEGIN_BLOCK and line.delimiter_type == DelimiterLineType.BEGIN_BLOCK
): ):
assert type(current_node) in NON_FINISHED_GROUPS assert type(current_node) in NON_FINISHED_GROUPS
current_node = dom.CodeBlock(line, line.type_data.subtype) current_node = dom.CodeBlock(line, line.type_data.subtype, line.arguments)
elif isinstance(line, Keyword): elif isinstance(line, Keyword):
logging.warning("Keywords not implemented on `as_dom()`") logging.warning("Keywords not implemented on `as_dom()`")