Browse Source

org-md: Fix spurious white space in Setext style

* contrib/lisp/org-md.el (org-md-headline): Fix spurious white space
  in Setext style.
Nicolas Goaziou 12 years ago
parent
commit
029e499939
1 changed files with 6 additions and 4 deletions
  1. 6 4
      contrib/lisp/org-md.el

+ 6 - 4
contrib/lisp/org-md.el

@@ -160,9 +160,9 @@ a communication channel."
 				     (mapconcat 'identity tag-list ":"))))))
 				     (mapconcat 'identity tag-list ":"))))))
 	   (priority (and (plist-get info :with-priority)
 	   (priority (and (plist-get info :with-priority)
 			  (org-element-property :priority headline)))
 			  (org-element-property :priority headline)))
-	   (heading (concat (and todo (concat " " todo))
-			    (and priority (concat " " priority))
-			    " " title)))
+	   (heading (concat (and todo (concat todo " "))
+			    (and priority (concat priority " "))
+			    title)))
       (cond
       (cond
        ;; Cannot create an headline.  Fall-back to a list.
        ;; Cannot create an headline.  Fall-back to a list.
        ((or (org-export-low-level-p headline info)
        ((or (org-export-low-level-p headline info)
@@ -186,7 +186,9 @@ a communication channel."
 		"\n\n"
 		"\n\n"
 		contents))
 		contents))
        ;; Use "atx" style.
        ;; Use "atx" style.
-       (t (concat (make-string level ?#) heading (and tags (concat "    " tags))
+       (t (concat (make-string level ?#) " "
+		  heading
+		  (and tags (concat "    " tags))
 		  "\n\n"
 		  "\n\n"
 		  contents))))))
 		  contents))))))