Closed SpencerDawkins closed 1 year ago
kramdown-rfc needs to construct nested sections from what is essentially a flat input structure. It looks for headings and generates a nested section start for each increase of the heading level. This increase needs to be by 1 or we don't have a section title to give to the new nesting level.
So if your introduction starts with ##
or you maybe have a ###
heading inside a #
heading, kramdown-rfc will reduce the heading level so there is only a by 1 increase and you get the warning.
Of course, decreasing the level is possible by any amount as sections can be closed without a needing a title.
Thank you! Now, I know exactly what to look for.
On Wed, Apr 26, 2023, 20:44 cabo @.***> wrote:
kramdown-rfc needs to construct nested sections from what is essentially a flat input structure. It looks for headings and generates a nested section start for each increase of the heading level. This increase needs to be by 1 or we don't have a section title to give to the new nesting level.
So if your introduction starts with ## or you maybe have a ### heading inside a # heading, kramdown-rfc will reduce the heading level so there is only a by 1 increase and you get the warning.
Of course, decreasing the level is possible by any amount as sections can be closed without a needing a title.
— Reply to this email directly, view it on GitHub https://github.com/cabo/kramdown-rfc/issues/194#issuecomment-1524417962, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSWECJJSN6CTJJ6G5N2IPLXDHFRRANCNFSM6AAAAAAXNCQNEI . You are receiving this because you authored the thread.Message ID: @.***>
I plan to improve the error message in the next release.
Slightly better error message (with line number) now in 1.6.32. https://github.com/cabo/kramdown-rfc/commit/cad3018
@cabo - thank you for this. If I'd had a line number pointing to "###", that would have helped me a lot!
I made a decent number of changes to my markdown file, and am now seeing (for the first time in my life)
I diffed my old and new markdown files, and don't see anything obvious, and part of my problem is almost certainly that I don't know how I can screw up "section nesting" in markdown.
Could you give me a clue?
Obviously this must have happened at least once in previous history, because the code checks for it now. What caused the problem last time? :upside_down_face: