visionmedia/js-yaml — Issue #36: Weird dedenting error
Author: sheriff
Created: 2011-11-11 21:09:57+00:00
State: open

Given

```yaml
addresses:
- title: Google Inc.
atoms:
- Google Inc.
- 1600 Amphitheatre Parkway
- Mountain View
postcode: CA 94043
country: US
- title: Google London
atoms:
- Google London
- Google UK Ltd
- Belgrave House
- 76 Buckingham Palace Road
- London
postcode: SW1W 9TQ
country: UK
```

I'm getting:

```
Error: hash not properly dedented, near "\n atoms:\n - Googl"
at Parser.expect (/mnt/hgfs/Code Folder/AddressFind/new_js/node_modules/yaml/lib/yaml.js:179:9)
at Parser.parseHash (/mnt/hgfs/Code Folder/AddressFind/new_js/node_modules/yaml/lib/yaml.js:280:12)
at Parser.parse (/mnt/hgfs/Code Folder/AddressFind/new_js/node_modules/yaml/lib/yaml.js:239:19)
at Object.eval (/mnt/hgfs/Code Folder/AddressFind/new_js/node_modules/yaml/lib/yaml.js:381:46)
at /mnt/hgfs/Code Folder/AddressFind/new_js/test.js:33:34
at /mnt/hgfs/Code Folder/AddressFind/new_js/node_modules/jsdom/lib/jsdom.js:193:9
at /mnt/hgfs/Code Folder/AddressFind/new_js/node_modules/jsdom/lib/jsdom.js:201:11
at Object. (/mnt/hgfs/Code Folder/AddressFind/new_js/node_modules/jsdom/lib/jsdom/level2/events.js:290:17)
at Object.dispatchEvent (/mnt/hgfs/Code Folder/AddressFind/new_js/node_modules/jsdom/lib/jsdom/level2/html.js:474:55)
at /mnt/hgfs/Code Folder/AddressFind/new_js/node_modules/jsdom/lib/jsdom/level2/html.js:61:15
```
Which is a shame. The YAML looks valid to me (and is happily parsed by the Perl YAML modules I'm using)