The new insert-jupyter-toc and insert-markdown-toc commands produce a toc
(table of contents) for in the selected node, at insert point of the body
text. They replace any selected text.
These two commands are almost identical. They very only in the details of
how they generate the url part of markdown links. See Note 2 below.
*Tip*: These commands produce a toc only for the selected node and it's
descendants, but that is not a real limitation. For example, you can
produce a complete toc for an @auto .ipynb tree by executing the command in
the @auto node itself, then cutting and pasting the toc into the first
child of the @auto node.
1. You *must *use the insert-jupyter-toc command inside .ipynb files. The
Jupyter online notebook is picky about what links it will accept. In
particular, case is important in url's. You probably should use
insert-markdown-toc for all other files.
2. Both commands clean both parts of markdown links, that is, the *[*] part*
and the *(*) part*. It's not clear what characters can be allowed in
general, but for now the rules are:
A. Within [*] parts, all non alpha-nums are removed, except ":" and "-" and
B. Same for (*) parts, except that blanks are converted to "-".
3. Similar logic is used in the exporter to clean section names.
The cleaning of markdown links is over-zealous, but it's not clear exactly
what characters are valid. In particular, html escapes will not work.
4. These two commands are defined in Leo's core. They are completely
separate from the @auto (importer/export) logic.
These two commands are important tools. Please try them and report any
problems or desired improvements.
I will be happy to allow more characters in markdown links, should you want
them. Just let me know.
The insert-markdown-toc is a component of #767
<https://github.com/leo-editor/leo-editor/issues/767>: Add markdown command
similar to rst3 command.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.