加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby – Jekyll YMAL嵌套列表抛出错误:找到违反了意图的制表符

发布时间:2020-12-16 21:20:08 所属栏目:百科 来源:网络整理
导读:这是我正在使用的列表. - name: Game1 platforms: { win32,win64,linux64 } distribution: - name: here url: null - name: desura url: http://www.desura.com/games/Game1 source: https://github.com/name/Game1 description: cg/games/Game1/description
这是我正在使用的列表.
- name: Game1
  platforms: { win32,win64,linux64 }
  distribution:
    - name: here
      url: null
    - name: desura 
      url: http://www.desura.com/games/Game1
    source: https://github.com/name/Game1
  description: cg/games/Game1/description.html
  release: 2013-06-23

这是它抛出的错误:

jekyll 2.2.0 | Error:  (C:/Users/User/jekyll-site/_data/games.yml): found a tab
character that violate intendation while scanning a plain scalar at line 39 {{- name: here}} column 13

如何修复此列表以使其有效?

解决方法

你有一个tab字符,yaml禁止它们,所以要做的第一件事就是确保没有标签.有几种方法可以做到这一点,包括删除每个空格并用空格字符替换它.大多数编辑器都有一种方法可视化空白区域以及它是否是制表符.还有一些程序可以将标签转换为空格字符.您可以谷歌搜索最适合您需求的内容.

在此之后,确保缩进是正确的,你应该没问题.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读