Can I make it so all code blocks are auto-titled EXCEPT bare no-language ones? #6848
-
If this would be better asked somewhere else, please forgive me (and point me in the right direction 😇) but ... in my markdown_extensions:
- pymdownx.highlight:
use_pygments: true
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
auto_title: true
linenums_style: pymdownx-inline 75% of the time, I love having the auto_title option enabled -- any time we specify a language, I love that the language becomes the title by default and we can change it with ```
code here
``` ... we get an ugly + unnecessary title that says "Text Only". Obviously, for those in-the-know, it's trivial to add |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @ryran, However, looking at https://facelessuser.github.io/pymdown-extensions/extensions/highlight/#options I see there is the So perhaps this would work to help set the default name as empty and hide the Text Only title auto_title_map:
text: '' |
Beta Was this translation helpful? Give feedback.
After looking at https://github.com/facelessuser/pymdown-extensions/blob/8f5283f71e8833f1ba0fa0bbe2680e1ad2c6cb19/pymdownx/highlight.py#L394-L398
I believe it will be something like that: