Skip to content

Commit

Permalink
Trying to fix sonar build
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanMathy committed Sep 23, 2020
1 parent 85b14e6 commit 928be7f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Boop/Boop/scripts/lib/js-yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ function writeScalar(state, string, level, iskey) {
return '>' + blockHeader(string, state.indent)
+ dropEndingNewline(indentString(foldString(string, lineWidth), indent));
case STYLE_DOUBLE:
return '"' + escapeString(string, lineWidth) + '"';
return '"' + escapeString(string) + '"';
default:
throw new YAMLException('impossible error: invalid scalar style');
}
Expand Down Expand Up @@ -1185,7 +1185,7 @@ var directiveHandlers = {

YAML: function handleYamlDirective(state, name, args) {

var match, major, minor;
var major, minor;

if (state.version !== null) {
throwError(state, 'duplication of %YAML directive');
Expand All @@ -1195,14 +1195,15 @@ var directiveHandlers = {
throwError(state, 'YAML directive accepts exactly one argument');
}

match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
var match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);

if (match === null) {
throwError(state, 'ill-formed argument of the YAML directive');
} else {
major = parseInt(match[1], 10);
minor = parseInt(match[2], 10);
}

major = parseInt(match[1], 10);
minor = parseInt(match[2], 10);

if (major !== 1) {
throwError(state, 'unacceptable YAML version of the document');
Expand Down

0 comments on commit 928be7f

Please sign in to comment.