Move a code block or collapsed section (or generally, anything after a checkbox line until the next checkbox line) when moving an unchecked checkbox line to another day.
All checks were successful
CI / test (push) Successful in 8m21s
Lint / test (push) Successful in 37s
Trivy / test (push) Successful in 18s

This commit is contained in:
Miguel Jacq 2025-12-26 17:06:45 +11:00
parent 9c7cb7ba2b
commit 7e47cef602
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
3 changed files with 179 additions and 45 deletions

View file

@ -1,6 +1,7 @@
import base64
import pytest
import re
from bouquin.markdown_editor import MarkdownEditor
from bouquin.markdown_highlighter import MarkdownHighlighter
from bouquin.theme import Theme, ThemeConfig, ThemeManager
@ -72,8 +73,13 @@ def test_apply_styles_and_headings(editor, qtbot):
editor.apply_italic()
editor.apply_strikethrough()
editor.apply_heading(24)
md = editor.to_markdown()
assert "**" in md and "*~~~~*" in md
md = editor.to_markdown().strip()
assert md.startswith("# ")
assert "~~hello world~~" in md
assert re.search(
r"\*{2,3}~~hello world~~\*{2,3}", md
) # bold or bold+italic wrapping strike
def test_toggle_lists_and_checkboxes(editor):