Compare commits

..

1 Commits

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

View File

@ -89,12 +89,11 @@ class BlockNode:
class CodeBlock(BlockNode): class CodeBlock(BlockNode):
def __init__(self, header, subtype, arguments): def __init__(self, header, subtype):
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, line.arguments) current_node = dom.CodeBlock(line, line.type_data.subtype)
elif isinstance(line, Keyword): elif isinstance(line, Keyword):
logging.warning("Keywords not implemented on `as_dom()`") logging.warning("Keywords not implemented on `as_dom()`")