max-mapper / max-mapper/requirebin
Commented code is executed, causes error
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 389
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
Using this code, including comments on bottom, in Chrome on Mac OSX, causes this error without any stacktrace
Uncaught SyntaxError: Unexpected end of input
The code (must include bottom two lines which are commented out)
var SVG = require('svg.js');
var canvas = document.createElement("canvas");
canvas.width = 500;
canvas.height = 500;
document.body.appendChild(canvas);
//var draw = SVG('drawing').size(300, 300);
//var rect = draw.rect(100, 100).attr({ fill: '#f06' });
If you remove the two commented lines, no error is produced. No error is produced if you use multiline comments as well:
/*
var draw = SVG('drawing').size(300, 300);
var rect = draw.rect(100, 100).attr({ fill: '#f06' });
*/
From a quick glance over the code, I'm thinking this might be an issue I should report to javascript-editor repo at https://www.npmjs.org/package/javascript-editor - do you agree?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named. Reproduce the supplied snippet in Chrome on macOS, comparing the line-comment and block-comment cases, then determine whether requirebin or javascript-editor is responsible. Done means identifying the responsible project and documenting or fixing the error without a missing stack trace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100