Skip to content

Conversation

@bjones1
Copy link

@bjones1 bjones1 commented Nov 3, 2025

I'd like to add an option on how Markdown headings are formatted: either as ATX (the usual):

# Level 1 heading
## Level 2 heading

or setext (the addition):

Level 1 heading
===============

Level 2 heading
---------------

This PR also plugs a small test hole (wrapping wasn't enabled for Headers_All.txt.

A question: for setext headers, this code must create an underline. To produce a visually appealing underline, it should split the heading text (which may contain more than one line) into lines, then determine the length of the longest line. Note that this
length should be determined after formatting, since lines may be wrapped during the formatting process.

Is there any way to add a post-processing step which would allow my code to examine the formatted output of a heading, then produce the appropriate-length underline?

Thanks for the great tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant