mdformat icon indicating copy to clipboard operation
mdformat copied to clipboard

fix: Thematic breaks should respect wrap length

Open sjoblomj opened this issue 1 year ago • 2 comments

Currently, a thematic break (hr) will always be 70 characters. This PR makes the thematic break respect the given wrap length.

  • If the user gives no wrap length, 70 characters will be used as per today.
  • If the user gives a very small wrap length, 3 characters will be used, as per the spec.

sjoblomj avatar Dec 27 '24 09:12 sjoblomj

Hey, thanks for the PR!

The --wrap feature is really only intended and documented to wrap paragraph text. This would be a new feature that can be considered in a separate issue or together with larger changes here https://github.com/hukkin/mdformat/issues/331.

hukkin avatar Feb 06 '25 12:02 hukkin

One other option to consider is contributing to this existing plugin: https://github.com/csala/mdformat-simple-breaks/issues/1

KyleKing avatar Feb 06 '25 20:02 KyleKing