Merge pull request #41 from skgsergio/master
Make headline underline characters customizable
This commit is contained in:
@@ -99,6 +99,7 @@
|
|||||||
(:rst-link-use-ref-role nil nil org-rst-link-use-ref-role)
|
(:rst-link-use-ref-role nil nil org-rst-link-use-ref-role)
|
||||||
(:rst-text-markup-alist nil nil org-rst-text-markup-alist)
|
(:rst-text-markup-alist nil nil org-rst-text-markup-alist)
|
||||||
(:rst-quote-margin nil nil org-rst-quote-margin)
|
(:rst-quote-margin nil nil org-rst-quote-margin)
|
||||||
|
(:rst-headline-underline-characters nil nil org-rst-headline-underline-characters)
|
||||||
(:rst-headline-spacing nil nil org-rst-headline-spacing)
|
(:rst-headline-spacing nil nil org-rst-headline-spacing)
|
||||||
(:rst-paragraph-spacing nil nil org-rst-paragraph-spacing)
|
(:rst-paragraph-spacing nil nil org-rst-paragraph-spacing)
|
||||||
(:rst-format-drawer-function nil nil org-rst-format-drawer-function)
|
(:rst-format-drawer-function nil nil org-rst-format-drawer-function)
|
||||||
@@ -231,6 +232,11 @@ the same number of blank lines as in the original document."
|
|||||||
(const :tag "Preserve original spacing" auto)))
|
(const :tag "Preserve original spacing" auto)))
|
||||||
|
|
||||||
|
|
||||||
|
(defcustom org-rst-headline-underline-characters '(?- ?~ ?^ ?: ?' ?\ ?_)
|
||||||
|
"List of underline characters for each headline level."
|
||||||
|
:group 'org-export-rst
|
||||||
|
:type 'list)
|
||||||
|
|
||||||
;;;; Drawers
|
;;;; Drawers
|
||||||
|
|
||||||
(defcustom org-rst-format-drawer-function nil
|
(defcustom org-rst-format-drawer-function nil
|
||||||
@@ -388,7 +394,7 @@ possible. It doesn't apply to `inlinetask' elements."
|
|||||||
(when (and underline headlinep)
|
(when (and underline headlinep)
|
||||||
(let ((under-char
|
(let ((under-char
|
||||||
(nth (1- (org-export-get-relative-level element info))
|
(nth (1- (org-export-get-relative-level element info))
|
||||||
'(?- ?~ ?^ ?: ?' ?\ ?_))))
|
org-rst-headline-underline-characters)))
|
||||||
(and under-char
|
(and under-char
|
||||||
(concat "\n"
|
(concat "\n"
|
||||||
(make-string (string-width first-part) under-char))))))))
|
(make-string (string-width first-part) under-char))))))))
|
||||||
|
|||||||
Reference in New Issue
Block a user