Permalink
Browse files

browser files rebuild

  • Loading branch information...
1 parent 39c5f2c commit e8a3ec487e474da5aada8c3df99ba453e9753230 @puzrin puzrin committed Nov 12, 2016
Showing with 17 additions and 13 deletions.
  1. +14 −10 dist/js-yaml.js
  2. +3 −3 dist/js-yaml.min.js
View
@@ -1,4 +1,4 @@
-/* js-yaml 3.6.1 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+/* js-yaml 3.7.0 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
@@ -174,8 +174,7 @@ function compileStyleMap(schema, map) {
if (tag.slice(0, 2) === '!!') {
tag = 'tag:yaml.org,2002:' + tag.slice(2);
}
-
- type = schema.compiledTypeMap[tag];
+ type = schema.compiledTypeMap['fallback'][tag];
if (type && _hasOwnProperty.call(type.styleAliases, style)) {
style = type.styleAliases[style];
@@ -1484,8 +1483,9 @@ function readSingleQuotedScalar(state, nodeIndent) {
ch = state.input.charCodeAt(++state.position);
if (ch === 0x27/* ' */) {
- captureStart = captureEnd = state.position;
+ captureStart = state.position;
state.position++;
+ captureEnd = state.position;
} else {
return true;
}
@@ -2330,8 +2330,8 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact
break;
}
}
- } else if (_hasOwnProperty.call(state.typeMap, state.tag)) {
- type = state.typeMap[state.tag];
+ } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {
+ type = state.typeMap[state.kind || 'fallback'][state.tag];
if (state.result !== null && type.kind !== state.kind) {
throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
@@ -2634,7 +2634,7 @@ function compileList(schema, name, result) {
schema[name].forEach(function (currentType) {
result.forEach(function (previousType, previousIndex) {
- if (previousType.tag === currentType.tag) {
+ if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {
exclude.push(previousIndex);
}
});
@@ -2649,16 +2649,20 @@ function compileList(schema, name, result) {
function compileMap(/* lists... */) {
- var result = {}, index, length;
+ var result = {
+ scalar: {},
+ sequence: {},
+ mapping: {},
+ fallback: {}
+ }, index, length;
function collectType(type) {
- result[type.tag] = type;
+ result[type.kind][type.tag] = result['fallback'][type.tag] = type;
}
for (index = 0, length = arguments.length; index < length; index += 1) {
arguments[index].forEach(collectType);
}
-
return result;
}
Oops, something went wrong.

0 comments on commit e8a3ec4

Please sign in to comment.