emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Feature Request] Create an org-md-toplevel-hlevel variable to allow


From: Ihor Radchenko
Subject: Re: [Feature Request] Create an org-md-toplevel-hlevel variable to allow users to set the level of top level headings in markdown export
Date: Mon, 22 Aug 2022 10:59:23 +0800

"Rohit Patnaik" <quanticle@quanticle.net> writes:

>> This contribution will be welcome.
>
> I've attached a patch which implements the change. I followed the pattern that
> ox-html uses to the greatest extent possible. I tested it by exporting 
> org-mode
> files to markdown with the table of contents both enabled and disabled. I
> didn't see any errors, and I was able to make the top level heading a level 2
> (or even level 3) heading rather than level 1.

Thanks for your contribution!
Please also add the NEWS entry and an item to "14.1.5 Options for the
exporters" section of the manual.

> Subject: [PATCH] Added top level header setting for md export
>
> This commit adds a customization, org-md-toplevel-hlevel, which sets the
> heading level of top-level headings in the exported markdown. This makes
> markdown export behave more like HTML export, which reads
> org-html-toplevel-hlevel to decide what the top level heading for HTML
> export should be.

Please follow the changelog style as described in
https://orgmode.org/worg/org-contribute.html#commit-messages

> +(defcustom org-md-toplevel-hlevel 1
> +  "The markdown heading level to use for level 1 headings in markdown export.
> +If this is 1, the top level headings will be level 1 markdown headings. If 
> this
> +is 2, then top level headings will be level 2 markdown headings. By default 
> +this is 1, so that org-mode headings correspond to the same level markdown
> +headings. Incrementing this value may be helpful creating markdown for 
> +inclusion in another document or application that reserves top-level headings
> +for its own use."
> +  :group 'org-export-md
> +  :type 'string)

Please follow the recommended documentation style: double space between
sentences, 80 chars fill.
See "D.6 Tips for Documentation Strings" section of Elisp manual.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



reply via email to

[Prev in Thread] Current Thread [Next in Thread]