From 778d04d17497be994f1aa069bb2dd6f120bc3919 Mon Sep 17 00:00:00 2001 From: Dan Cox Date: Thu, 11 Jan 2024 22:20:08 -0500 Subject: [PATCH 1/2] Adding "Warning" to parsing warnings --- src/Twine2HTML/parse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Twine2HTML/parse.js b/src/Twine2HTML/parse.js index 0536d132..e5d11d11 100644 --- a/src/Twine2HTML/parse.js +++ b/src/Twine2HTML/parse.js @@ -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!'); } /** @@ -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!'); } /** From 11f4d1d553a583f35d0569fed0712644213be13d Mon Sep 17 00:00:00 2001 From: Dan Cox Date: Mon, 15 Jan 2024 15:30:07 -0500 Subject: [PATCH 2/2] Attempting to fix test issue --- test/Twine2HTML/Twine2HTML.Parse.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Twine2HTML/Twine2HTML.Parse.test.js b/test/Twine2HTML/Twine2HTML.Parse.test.js index 6dfb22cc..8d8fb37c 100644 --- a/test/Twine2HTML/Twine2HTML.Parse.test.js +++ b/test/Twine2HTML/Twine2HTML.Parse.test.js @@ -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(''); });