Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Commented code is executed, causes error

オープン
#65 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript
領域
tooling

調査の方向性

リポジトリのファイルもテストも指定されていません。提示されたスニペットを macOS の Chrome で再現し、行コメントの場合とブロックコメントの場合を比較してから、requirebin と javascript-editor のどちらに原因があるのかを特定してください。責任のあるプロジェクトを特定し、エラーを文書化または修正し、スタックトレースが欠落していない状態にすることが完了の条件です。

索引モデルが issue の本文から書いたものです。

説明

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?

主要言語
JavaScript
スター
389
フォーク
74
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

max-mapper/requirebin のほかの issue

max-mapper/requirebin の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。