From 8666288c7dcbfcf938eeb3befa2e545a2c147cbf Mon Sep 17 00:00:00 2001 From: Choi KyuWoo Date: Sun, 17 Apr 2016 13:37:29 +0900 Subject: [PATCH] js-yaml error on duplicated mapping key It seems js-yaml starts issuing error on duplicated mapping key since around js-yaml@3.5 https://github.com/nodeca/js-yaml/issues/242 adding json option fixes by overriding duplicated mapping key as it was expected before. --- lib/languages.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/languages.coffee b/lib/languages.coffee index 9b191cc..057936a 100644 --- a/lib/languages.coffee +++ b/lib/languages.coffee @@ -10,7 +10,7 @@ module.exports = # # Returns an {Object} mapping language name to language record. all: (recordsPath = path.join(__dirname, '../data/languages.yml')) -> - @languages ?= Yaml.safeLoad(fs.readFileSync(recordsPath)) + @languages ?= Yaml.safeLoad(fs.readFileSync(recordsPath), {json: true}) # Public: Finds the list of language candidates from the supplied extension. #