gitdown icon indicating copy to clipboard operation
gitdown copied to clipboard

Option to control the TOC text for specific anchors

Open esjewett opened this issue 11 years ago • 2 comments

Sometimes I don't want to display the full heading of a section in the table of contents. Is there or could there be an option to override the heading display?

Example: currently in the Reductio README (https://github.com/esjewett/reductio), one heading is "reductio.avg(boolean|value)". I would like this to be the heading, but in the TOC I'd like to display only "avg".

esjewett avatar Jan 25 '15 17:01 esjewett

This should be first raised with https://github.com/gajus/contents. Though, yes, it can be done with a custom callback. I will keep track of this. Don't have a lot of time for open source before the end of the month.

gajus avatar Jan 25 '15 23:01 gajus

Thanks - I figured out how to embed HTML formatting, so that alleviates the problem a bit. No hurry!

On Sunday, January 25, 2015, Gajus Kuizinas [email protected] wrote:

This should be first raised with https://github.com/gajus/contents. Though, yes, it can be done with a custom callback. I will keep track of this. Don't have a lot of time for open source before the end of the month.

— Reply to this email directly or view it on GitHub https://github.com/gajus/gitdown/issues/26#issuecomment-71398949.

esjewett avatar Jan 25 '15 23:01 esjewett