Compare commits

..

No commits in common. "fix/strip-title" and "develop" have entirely different histories.

View File

@ -415,6 +415,7 @@ class Headline:
isinstance(line, DelimiterLine)
and line.delimiter_type == DelimiterLineType.END_BLOCK
):
start = current_node.header.linenum
end = line.linenum
@ -814,6 +815,7 @@ class Headline:
def set_property(self, name: str, value: str):
for prop in self.properties:
# A matching property is found, update it
if prop.key == name:
prop.value = value
@ -998,6 +1000,7 @@ class Headline:
and result_first[0] == "structural"
and result_first[1].strip().upper() == ":RESULTS:"
):
(end_line, _) = self.get_structural_end_after(
kword.linenum + 1
)
@ -1792,7 +1795,7 @@ def token_list_to_plaintext(tok_list) -> str:
else:
assert isinstance(chunk, MarkerToken)
return "".join(contents).strip()
return "".join(contents)
def token_list_to_raw(tok_list):
@ -2014,6 +2017,7 @@ def tokenize_contents(contents: str) -> List[TokenItems]:
and is_pre(last_char)
and ((i + 1 < len(contents)) and is_border(contents[i + 1]))
):
is_valid_mark = False
# Check that is closed later
text_in_line = True
@ -2404,6 +2408,7 @@ class OrgDoc:
# Writing
def dump_headline(self, headline, recursive=True):
tags = ""
if len(headline.shallow_tags) > 0:
tags = ":" + ":".join(headline.shallow_tags) + ":"
@ -2417,14 +2422,7 @@ class OrgDoc:
if not (raw_title.endswith(" ") or raw_title.endswith("\t")) and tags:
tags_padding = " "
yield (
"*" * headline.depth
+ headline.spacing
+ state
+ raw_title
+ tags_padding
+ tags
)
yield "*" * headline.depth + headline.spacing + state + raw_title + tags_padding + tags
planning = headline.get_planning_line()
if planning is not None: