Browse Source

org-element: Fix line break parsing

* lisp/org-element.el (org-element-line-break-parser): Line break
  includes the newline character following the backslashes.
(org-element-line-break-interpreter): Apply changes to line break
parsing.
Nicolas Goaziou 12 năm trước cách đây
mục cha
commit
6e37a4d114
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      lisp/org-element.el

+ 5 - 2
lisp/org-element.el

@@ -2946,12 +2946,15 @@ Return a list whose CAR is `line-break', and CDR a plist with
 `:begin', `:end' and `:post-blank' keywords.
 
 Assume point is at the beginning of the line break."
-  (list 'line-break (list :begin (point) :end (point-at-eol) :post-blank 0)))
+  (list 'line-break
+	(list :begin (point)
+	      :end (progn (forward-line) (point))
+	      :post-blank 0)))
 
 (defun org-element-line-break-interpreter (line-break contents)
   "Interpret LINE-BREAK object as Org syntax.
 CONTENTS is nil."
-  "\\\\")
+  "\\\\\n")
 
 (defun org-element-line-break-successor (limit)
   "Search for the next line-break object.