[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 56992b221e 1/2: Merge branch 'bugfix'
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 56992b221e 1/2: Merge branch 'bugfix' |
Date: |
Sun, 5 May 2024 15:58:37 -0400 (EDT) |
branch: externals/org
commit 56992b221e24f31d75c309693e1c485eebd6eb63
Merge: 288e0a11c2 24feef95e4
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
Merge branch 'bugfix'
---
lisp/org.el | 2 +-
lisp/ox-md.el | 2 +-
testing/lisp/test-ox-md.el | 19 +++++++++++++++++++
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 20879685c2..3d3aca2a64 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9048,7 +9048,7 @@ keywords relative to each registered export backend."
'("ARCHIVE:" "AUTHOR:" "BIBLIOGRAPHY:" "BIND:" "CATEGORY:" "CITE_EXPORT:"
"COLUMNS:" "CREATOR:" "DATE:" "DESCRIPTION:" "DRAWERS:" "EMAIL:"
"EXCLUDE_TAGS:" "FILETAGS:" "INCLUDE:" "INDEX:" "KEYWORDS:" "LANGUAGE:"
- "MACRO:" "OPTIONS:" "PROPERTY:" "PRINT_BIBLIOGRAPHY" "PRIORITIES:"
+ "MACRO:" "OPTIONS:" "PROPERTY:" "PRINT_BIBLIOGRAPHY:" "PRIORITIES:"
"SELECT_TAGS:" "SEQ_TODO:" "SETUPFILE:" "STARTUP:" "TAGS:" "TITLE:" "TODO:"
"TYP_TODO:" "SELECT_TAGS:" "EXCLUDE_TAGS:" "EXPORT_FILE_NAME:"))
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index fa2beeb95a..48a3e8387b 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -452,7 +452,7 @@ a communication channel."
(org-list-parents-alist struct)))))
"."))))
(concat bullet
- (make-string (- 4 (length bullet)) ? )
+ (make-string (max 1 (- 4 (length bullet))) ? )
(pcase (org-element-property :checkbox item)
(`on "[X] ")
(`trans "[-] ")
diff --git a/testing/lisp/test-ox-md.el b/testing/lisp/test-ox-md.el
index bf3dced1b5..550265fdf8 100644
--- a/testing/lisp/test-ox-md.el
+++ b/testing/lisp/test-ox-md.el
@@ -39,5 +39,24 @@
(goto-char (point-min))
(should (search-forward "#### Footnotes"))))))
+(ert-deftest ox-md/item ()
+ "Test `org-md-item'."
+ ;; Align items at column 4.
+ ;; Columns >=100 not aligned.
+ (org-test-with-temp-text
+ (mapconcat
+ #'identity
+ (cl-loop for n from 1 to 105
+ collect (format "%d. item" n))
+ "\n")
+ (let ((export-buffer "*Test MD Export*")
+ (org-export-show-temporary-export-buffer nil))
+ (org-export-to-buffer 'md export-buffer)
+ (with-current-buffer export-buffer
+ (goto-char (point-min))
+ (should (search-forward "1. item"))
+ (should (search-forward "10. item"))
+ (should (search-forward "101. item"))))))
+
(provide 'test-ox-md)
;;; test-ox-md.el ends here