https://codereview.chromium.org/316173002/diff/120001/src/scanner.cc#newcode318
src/scanner.cc:318: // Magic comments are of the form \s*name\s*=\s*value\s*.*
and this function
We might need to allow only single whitespace between @ and sourceURL= and no
space between sourceURL and =:

...@\ssourceURL=\s*...

Personally I'd prefer \s+sourceURL=\s* but it wouldn't match what I see at
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/

Vsevolod, what do you think?
We are currently supporting single whitespace only and I would prefer not change
this.
Actually we have very strict regex for the comment line: //[#@][
\t]sourceURL=[^\s]* which (roughly) matches Source Map Revision 3 Proposal.
So we try to prohibit any extra spaces.

https://codereview.chromium.org/316173002/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to