Skip to content

Commit

Permalink
Browser files rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Puzrin committed Apr 5, 2017
1 parent 0ad532e commit 98c2166
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
21 changes: 15 additions & 6 deletions dist/js-yaml.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* js-yaml 3.8.2 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.8.3 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';


Expand Down Expand Up @@ -3114,7 +3114,12 @@ var YAML_FLOAT_PATTERN = new RegExp(
function resolveYamlFloat(data) {
if (data === null) return false;

if (!YAML_FLOAT_PATTERN.test(data)) return false;
if (!YAML_FLOAT_PATTERN.test(data) ||
// Quick hack to not allow integers end with `_`
// Probably should update regexp & check speed
data[data.length - 1] === '_') {
return false;
}

return true;
}
Expand Down Expand Up @@ -3259,7 +3264,7 @@ function resolveYamlInteger(data) {
if (ch !== '0' && ch !== '1') return false;
hasDigits = true;
}
return hasDigits;
return hasDigits && ch !== '_';
}


Expand All @@ -3273,7 +3278,7 @@ function resolveYamlInteger(data) {
if (!isHexCode(data.charCodeAt(index))) return false;
hasDigits = true;
}
return hasDigits;
return hasDigits && ch !== '_';
}

// base 8
Expand All @@ -3283,11 +3288,14 @@ function resolveYamlInteger(data) {
if (!isOctCode(data.charCodeAt(index))) return false;
hasDigits = true;
}
return hasDigits;
return hasDigits && ch !== '_';
}

// base 10 (except 0) or base 60

// value should not start with `_`;
if (ch === '_') return false;

for (; index < max; index++) {
ch = data[index];
if (ch === '_') continue;
Expand All @@ -3298,7 +3306,8 @@ function resolveYamlInteger(data) {
hasDigits = true;
}

if (!hasDigits) return false;
// Should have digits and should not end with `_`
if (!hasDigits || ch === '_') return false;

// if !base60 - done;
if (ch !== ':') return true;
Expand Down
Loading

0 comments on commit 98c2166

Please sign in to comment.