Kunde21 / markdownfmt

Like gofmt, but for Markdown.
MIT License
55 stars 7 forks source link

Make hash headers optional and default #14

Closed Kunde21 closed 3 years ago

Kunde21 commented 3 years ago

Hash and underline headers result in the same parsed structure, so we should be able to manage and generate both.

Other parsers will default to hash headers, so I feel okay defaulting to the same (merged in #13).
This leaves underline headers as an optional generation target. An option flag fits here as a solution to the bike-shedding problem.

bwplotka commented 3 years ago

:+1:

karelbilek commented 3 years ago

I personally prefer underline

But I look in the source code now, and it seems like with the refactor, adding the underlines would be too much complexity for dubious benefit. (Currently, we just print ## on entering the node, which is much simpler)

I'm for simplicity :) let's keep it as hashes. (Maybe keep this as nice-to-have? I don't know)

bwplotka commented 3 years ago

Your PR makes sense. I am happy to make default whatever as well. Up to you (: