diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2011-01-19 10:57:25 +0100 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2011-01-19 10:57:25 +0100 |
commit | 4007c1cdcead1a2ef52ed7e57d5615203a05204c (patch) | |
tree | 8fd46605f95a4763177a597be86a64a68fb860b0 | |
parent | 20a3c2a6b67232ebc3e557f4354f75582ef18851 (diff) | |
download | org-mode-4007c1cdcead1a2ef52ed7e57d5615203a05204c.tar.gz |
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
-rw-r--r-- | lisp/org-ascii.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el index 99facb1..01106c3 100644 --- a/lisp/org-ascii.el +++ b/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)))) |