When does whitespace in JavaScript matter?

V

VK

Oh, so you're an opponent are you? Sorry, my mistake, I hadn't realised I
was fighting you.

Possibly previous clj discussions made me overly defensive. Sorry then.
I read the section of the spec that you sent me to and it seemed to
contradict you. I know though that the ecmascript spec can be very
confusing, so I simply asked you to clarify what you had said. I could
have interpreted it incorrectly: I have done in the past and no doubt will
again in the future. It was a request for information.

I am not sure anymore myself if I have interpreted it correctly: I have
done mistakes in the past and no doubt will again in the future :)
:-|

That would help to understand the exact meaning of "white space"
(a.k.a. whitespace) term in ECMAScript: _not_ that one from written
definitions and comments, but that one resulting from the formal
algorithms provided in specs.

P.S.
"JavaScript Language Specification : Preliminary Draft"
Brendan Eich
C. Rand Mckinney
11/18/96
"White space is defined as the ASCII space, horizontal tab, and form
feed characters, as well as line terminators."

ECMAScript 3rd ed.:
"The source text of an ECMAScript program is first converted into a
sequence of input elements, which are either tokens, line terminators,
comments, or white space."

Unicode, Inc.:
"There are other characters that have no visible glyphs: the whitespace
characters. These typically have advance-width, however. The line
separation characters such as CR do not clearly exhibit this
advance-width because they are always at the end of a line, but most
GUIs show a visible advance width when selected."

And the sh** like that all across the Internet. If you still keep some
idea of what whitespace is as such, and what is it in javascript and
what is it in javascript output to HTML parser - then you are lucky and
I'm not.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top