Skip to content

Commit

Permalink
Merge pull request #450 from videlais/446-consider-loose-parsing-modes
Browse files Browse the repository at this point in the history
Adding "Warning" to parsing warnings
  • Loading branch information
videlais authored Jan 15, 2024
2 parents ba632a8 + 11f4d1d commit cf51364
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Twine2HTML/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function parse (content) {
story.name = storyData.attributes.name;
} else {
// Name is a required field. Warn user.
console.warn('Twine 2 HTML must have a name!');
console.warn('Warning: The name attribute is required!');
}

/**
Expand All @@ -74,7 +74,7 @@ function parse (content) {
story.IFID = storyData.attributes.ifid;
} else {
// Name is a required filed. Warn user.
console.warn('Twine 2 HTML must have an IFID!');
console.warn('Warning: The IFID attribute is required!');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/Twine2HTML/Twine2HTML.Parse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('Twine2HTMLParser', () => {
});

it('Should parse HTML without passage start node', () => {
const fr = readFileSync('test/Twine2HTML/Twine2HTMLParser/missingStartNode.html', 'utf-8');
const fr = readFileSync('test/Twine2HTML/Twine2HTMLParser/missingStartnode.html', 'utf-8');
const story = parseTwine2HTML(fr);
expect(story.start).toBe('');
});
Expand Down

0 comments on commit cf51364

Please sign in to comment.