Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jekyll YMAL nested list throws error: found a tab character that violate intendation

This is the list I'm using.

- 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

And this is the error it throws:

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

How do I fix this list so it works?

like image 780
CyanPrime Avatar asked Aug 09 '14 17:08

CyanPrime


People also ask

How do I fix indentation error in YAML?

A YAML file use spaces as indentation, you can use 2 or 4 spaces for indentation, but no tab. In other words, tab indentation is forbidden: Why does YAML forbid tabs? Tabs have been outlawed since they are treated differently by different editors and tools.

What is tab character in YAML?

YAML recognizes two white space characters: space and tab. The following examples will use · to denote spaces and → to denote tabs. All examples can be validated using the official YAML Reference Parser. YAML has a block style and flow style. In block style, indentation determines the structure of a document.

Does YAML use tabs or spaces?

Spaces vs TabsYAML uses spaces, period. Do not use tabs in your SLS files! If strange errors are coming up in rendering SLS files, make sure to check that no tabs have crept in!


1 Answers

You have a tab character somewhere and yaml forbids them, so the first thing to do ensure that there are no tabs. There are several ways to do this, including removing every white space and replacing it with a space character. Most editors have a way to visualize white space and whether or not it is a tab character. There are also programs that convert tabs to space characters. You can google for whatever suits your needs best.

After this, ensure that the indentation is correct and you should be okay.

like image 159
dax Avatar answered Oct 19 '22 02:10

dax