mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Do we have header level start setting ? #323
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gr8tushar on GitHub (Sep 11, 2019).
Hi,
Do you have something like headerLevelStart as it is in showdownjs ?
Basically it allows you to define from where do you want to start the headers?
e.g. If I set the headerLevelStart as 3,
foo
will be parsed as
foo
@MihaZupan commented on GitHub (Sep 11, 2019):
You can modify the heading level after the document is parsed like so
@gr8tushar commented on GitHub (Sep 12, 2019):
Hi @MihaZupan,
Thanks for the answer.
I want to read mark down content from DB and render it as HTML. Since my DB already has data with content having h1 tags in it, I would want to reduce them to h2 and so forth, because in my site, I would like to use h1 for Page Title.
So in net shell, after reading the content from DB, i'll have to increase the heading level and then convert it into HTML. Right ?
Won't it be good if we have some sort of configuration in the converter itself ?
@MihaZupan commented on GitHub (Sep 14, 2019):
is an abstraction over
You can do any post-processing to the document before rendering it, like increasing heading levels.
This exact heading post-processing could be exposed as a configuration, but I don't think it's common enough of a scenario, especially considering that implementing it yourself takes 2 lines of code.