Skip to content

Commit

Permalink
Issue creationix#56 Parse eol-style comments in a raw JavaScript code
Browse files Browse the repository at this point in the history
  • Loading branch information
irverbitskiy committed Jan 13, 2012
1 parent 349ede1 commit 69f28e5
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/js_eol_comment.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
:each user in users
- var testComment = "hello " + user // sample eol-comment
%div&= testComment

:each user in users
- var testComment = 'hello ' + user // sample eol-comment
%div&= testComment

:each user in users
- var testComment = "hello // ok " + user
%div&= testComment

:each user in users
- var testComment = "hello // ok " + user // sample eol-comment
%div&= testComment

:each user in users
- var testComment = 'hello // ok ' + user
%div&= testComment

:each user in users
- var testComment = 'hello // ok ' + user // sample eol-comment
%div&= testComment

:each user in users
- var testComment = "hel'lo " + user // sample eol-comment
%div&= testComment

:each user in users
- var testComment = 'hel"lo ' + user // sample eol-comment
%div&= testComment
1 change: 1 addition & 0 deletions test/js_eol_comment.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>hello Alex</div><div>hello Alex</div><div>hello // ok Alex</div><div>hello // ok Alex</div><div>hello // ok Alex</div><div>hello // ok Alex</div><div>hel'lo Alex</div><div>hel&quot;lo Alex</div>
5 changes: 5 additions & 0 deletions test/js_eol_comment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
locals: {
users: ["Alex"]
}
}

0 comments on commit 69f28e5

Please sign in to comment.