showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.19k stars 1.56k forks source link

hypen in new line makes the previous line to an <h2> #957

Open killerbytes opened 1 year ago

killerbytes commented 1 year ago

Input: test

Expected output:

test
-

Actual Output:

test

https://jsfiddle.net/killerbytes/gzfxhs3L/1/

I guess this is a markdown issue since it also affects github's editor

Edit: I found out this is called setext Anyway to disable it?

KilianU commented 8 months ago

The config option smoothLivePreview might deliver a small mitigation as it requires at least two hyphens to make a heading.