Jekyll将每个换行符转换为换行符 [英] Jekyll converting every newline as line break

查看:108
本文介绍了Jekyll将每个换行符转换为换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有kramdown的Jekyll创建一个静态站点,今天我注意到,每当我在新行中继续同一句子时,Jekyll都会在其中插入<br />标记.它以前从未发生过.

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.

由于我所有的markdown文件都没有超过80个字符的限制,因此最终网站的格式看起来像废话.为什么杰基尔这样做?

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?

推荐答案

我已经在Jekyll 1.5至2.2上测试了此行为.

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

对我来说,此设置会导致Kramdown用BR替换换行符.

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

kramdown:
  input: GFM

这可以解决它:

kramdown:
  input: GFM
  hard_wrap: false

这篇关于Jekyll将每个换行符转换为换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆