Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit a909794

Browse files
committed
Bug fix: little mistake in regex for matching multiline all whitespace.
1 parent 29feffb commit a909794

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runestone/activecode/js/activecode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ ActiveCode.prototype.saveEditor = function () {
290290

291291
var data = {acid: this.divid, code: this.editor.getValue()};
292292
data.lang = this.language;
293-
if (data.code.match(/^\s$/m)) {
293+
if (data.code.match(/^\s+$/)) {
294294
res = confirm("You are about to save an empty program, this will overwrite a previously saved program. Continue?");
295295
if (! res) {
296296
return;

0 commit comments

Comments
 (0)