-
Notifications
You must be signed in to change notification settings - Fork 885
Closed
Labels
confirmedConfirmed bug report or approved feature request.Confirmed bug report or approved feature request.extensionRelated to one or more of the included extensions.Related to one or more of the included extensions.featureFeature request.Feature request.
Description
[TOC]
# Header 1
will currently generate the following HTML:
<div class="toc">
<ul>
<li><a href="#header-1">Header 1</a></li>
</ul>
</div>
<h1 id="header-1">Header 1</h1>
The class="toc"
cannot be changed, although using custom classes are supported for anchorlinks (anchorlink_class
) and permalinks (permalink_class
).
I suggest that another config parameter toc_class
that defaults to the current class toc
is introduced. This is useful if in use with CSS frameworks that apply certain styles to prose content but allow disabling the additional styles when a certain class is present. For TailwindCSS, the extension could be called like so:
md = markdown.Markdown(extensions=[TocExtension(toc_class="toc not-prose")]
Metadata
Metadata
Assignees
Labels
confirmedConfirmed bug report or approved feature request.Confirmed bug report or approved feature request.extensionRelated to one or more of the included extensions.Related to one or more of the included extensions.featureFeature request.Feature request.