#7666: Alphanumeric cell IDs, resize on paste (#2902), ESC ends introspection
(#5644), JSLint for notebook_lib.js
---------------------------+------------------------------------------------
Reporter: mpatel | Owner: was
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.3.1
Component: notebook | Keywords:
Work_issues: | Author: Mitesh Patel
Upstream: N/A | Reviewer:
Merged: |
---------------------------+------------------------------------------------
Comment(by mpatel):
Found the problem: The `JavaScriptCompressor` converts, in effect,
{{{
#!js
function foo() {
return 'hello';
}
}}}
to
{{{
#!js
function foo(){return
'hello'
;}
}}}
But
[http://www.jslint.com/lint.html In JavaScript, a linefeed can be
whitespace or it can act as a semicolon. This replaces one ambiguity with
another.]
In particular, if I execute `foo();`, the former returns `'hello'` and
latter returns `undefined`. I've modified the compressor in V5 so that it
does not insert extra `'\n'`s. Of course, we should replace this with an
free / open source, stable, Pythonic minifier (see above), when we can.
By the way, the YUI Compressor yields
{{{
#!js
function foo(){return"hello"}
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7666#comment:25>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.