wip: First approach to get going.
Some checks failed
Testing / pytest (push) Successful in 27s
Testing / mypy (push) Failing after 32s
Testing / stability-extra-test (push) Successful in 22s

This commit is contained in:
Sergio Martínez Portela 2024-07-22 23:31:19 +01:00
parent a56ac018a8
commit 134d872ca6

View File

@ -772,6 +772,20 @@ class Headline:
else: else:
raise NotImplementedError() raise NotImplementedError()
def update_raw_contents(self, new_contents):
# @TODO: Properly re-parse elements
self.keywords = []
self.contents = []
self.list_items = []
self.table_rows = []
self.properties = []
self.structural = []
self.delimiters = []
for line in new_contents.split('\n'):
self.contents.append(
RawLine(linenum=0, line=line)
)
def get_element_in_line(self, linenum): def get_element_in_line(self, linenum):
for line in self.contents: for line in self.contents:
if linenum == line.linenum: if linenum == line.linenum: