orkmode/crates/ork-server
Levi Neely de43a3721d Fix empty section body when content follows a property drawer
section_body_text() checked for a drawer START (:NAME:) before checking
for a drawer END (:END:). But :END: itself matches the generic :NAME:
pattern, so the end line re-opened a drawer instead of closing it,
leaving in_drawer set and swallowing the body that followed. A section
whose only content came after a property drawer therefore rendered an
empty /body (and, by extension, empty fuzzy-resolve bodies and GUI
sections).

Reorder the two checks: when already inside a drawer, handle :END:
first and consume the line, before the drawer-start pattern can match
it. This also leaves planning-line and leading-blank handling intact.

Add regression tests: body after a drawer directly under the headline,
and body after a planning line plus drawer. Server tests: 63 passed.
2026-10-02 12:21:32 +02:00
..
src Fix empty section body when content follows a property drawer 2026-10-02 12:21:32 +02:00
Cargo.toml Add language plugin registry and Emacs-style #+RESULTS: formatting 2026-10-01 13:36:38 +02:00