Browse Source

Fix bug in ASCII export

* lisp/org-ascii.el (org-ascii-level-start): Catch the case of levels
which do not have an equivalent in the list of underline characters.

For more information see

http://thread.gmane.org/gmane.emacs.orgmode/36097
Carsten Dominik 14 years ago
parent
commit
4007c1cdce
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org-ascii.el

+ 3 - 1
lisp/org-ascii.el

@@ -652,7 +652,9 @@ publishing directory."
       (if (or (not (equal (char-before) ?\n))
 	      (not (equal (char-before (1- (point))) ?\n)))
 	  (insert "\n"))
-      (setq char (nth (- umax level) (reverse org-export-ascii-underline)))
+      (setq char (or (nth (max (- umax level) 0)
+			  (reverse org-export-ascii-underline))
+		     (last org-export-ascii-underline)))	    
       (unless org-export-with-tags
 	(if (string-match (org-re "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") title)
 	    (setq title (replace-match "" t t title))))