Jekyll converting every newline as line break

2019-04-21 20:56发布

问题:

I'm using Jekyll with kramdown to make a static site and I noticed today that whenever I continued the same sentence to a new line, Jekyll is inserting a <br /> tag there. It never used to happen before.

Since all my markdown files don't cross the 80 char limit, the formatting of the final website looks like crap. Why is Jekyll doing this?

回答1:

I've tested this behavior on Jekyll 1.5 to 2.2.

For me, this setup causes Kramdown to replace newlines by BRs.

kramdown:
  input: GFM

This resolves it :

kramdown:
  input: GFM
  hard_wrap: false