Skip to content

Commit

Permalink
fix: error when changing indentation level
Browse files Browse the repository at this point in the history
  • Loading branch information
thiswillbeyourgithub committed Jul 31, 2024
1 parent c01aeb0 commit ef50fa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LogseqMarkdownParser/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def indentation_level(self, new: int) -> None:
# because this way we make sure that leading spaces are replaced
# by tabs
assert new % 4 == 0, f"new indentation level must be divisible by 4, not {new}"
unindented = textwrap.dedent(self.content)
unindented = textwrap.dedent(self.content).strip()
reindented = textwrap.indent(unindented, "\t" * (new // 4))
self.content = reindented
self._changed = True
Expand Down

0 comments on commit ef50fa0

Please sign in to comment.