Help with customizing a package


#1

The markdown-toc package indicates it can be customized with a number of different settings. Unfortunately, I cannot figure out where to define the settings. Is there a standard way to do this in Atom.

The values in question are:

Set depth control [1-6] with depthFrom:1 and depthTo:6
Enable or disable links with withLinks:1


#2

You can find information about this in the Flight Manual section about Atom packages:

http://flight-manual.atom.io/using-atom/sections/atom-packages/


#3

Thanks for the link, leedohm.

But that section does not seem to have the answer. This package has no Settings section where the parameters can be customized. All it has is this:

Features

Auto linking via anchor tags, e.g. # A 1 → #a-1
Depth control [1-6] with depthFrom:1 and depthTo:6
Enable or disable links with withLinks:1
Refresh list on save with updateOnSave:1
Use ordered list (1. …, 2. …) with orderedList:0

Any idea if I need to put these settings into a config file or somewhere else. I tried contacting the package author but got no response.


#4

From looking at the source of the package, it appears that they’ve built the package in such a way that you have to edit the source code in order to customize the settings. I don’t think editing anything in a configuration file will do it.


#5

Thanks again for taking the time to answer my question. I looked at the code and found the answer.

The generator inserts a comment line above the toc like this:

<!-- TOC depthFrom:1 depthTo:2 withLinks:1 updateOnSave:1 orderedList:0 -->

I thought it was a reference to the settings used to create the TOC, but in fact if you change the values in the comment and then update the TOC ( CTRL-ALT-U) it changes the TOC using the new settings!