branch: externals/org-modern
commit 8710dada4388f4acb3df44e8a9585f18ccb3a14c
Author: JD Smith <93749+jdtsm...@users.noreply.github.com>
Commit: JD Smith <93749+jdtsm...@users.noreply.github.com>

    beg-end: simplify skipping post-blank lines
    
    The value of :post-blank is variable, depending on whether the element
    ends at EOB or on another element (heading, block, paragraph, etc.).
    So just skip tab/space/newline backwards.
---
 org-modern-indent.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/org-modern-indent.el b/org-modern-indent.el
index 155f529125..2a6814884d 100644
--- a/org-modern-indent.el
+++ b/org-modern-indent.el
@@ -120,11 +120,10 @@ affiliated content like title as part of the block."
 BEG is at the beginning of the #+BEGIN line, and END is at the end of
 the #+END line."
   (let* ((bbeg (org-element-property :post-affiliated node)) ; on #+begin
-        (blank-lines (org-element-property :post-blank node))
         (bend (save-excursion
                 (goto-char (org-element-property :end node))
-                (if (eobp) (point)
-                  (line-end-position (- blank-lines))))))
+                (skip-chars-backward "\n\t ")
+                (point))))
     (cons bbeg bend)))
 
 (defun omi/-walk-blocks (beg end fun)

Reply via email to