-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ruby/ERB: Fixed block comments (#1768)
This fixes block comments in Ruby and ERB.
- Loading branch information
1 parent
571704c
commit c805f85
Showing
6 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<%# this is a block comment %> | ||
<% | ||
=begin %> | ||
block comment | ||
(both lines of both the begin and end tags must be at the start of their lines) | ||
<% | ||
=end %> | ||
|
||
<%# this is not %> | ||
<% | ||
=begin %> | ||
not a comment | ||
<% | ||
=end %> | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["erb", [ | ||
["delimiter", "<%"], | ||
["comment", "# this is a block comment "], | ||
["delimiter", "%>"] | ||
]], | ||
|
||
["erb", [ | ||
["delimiter", "<%"], | ||
["comment", "=begin %>\n\tblock comment\n\t(both lines of both the begin and end tags must be at the start of their lines)\n<%\n=end"], | ||
["delimiter", "%>"] | ||
]], | ||
|
||
["erb", [ | ||
["delimiter", "<%"], | ||
["comment", "# this is not "], | ||
["delimiter", "%>"] | ||
]], | ||
|
||
["erb", [ | ||
["delimiter", "<%"], | ||
["operator", "="], | ||
["keyword", "begin"], | ||
["delimiter", "%>"] | ||
]], | ||
|
||
"\n\tnot a comment\n\t", | ||
|
||
["erb", [ | ||
["delimiter", "<%"], | ||
["operator", "="], | ||
["keyword", "end"], | ||
["delimiter", "%>"] | ||
]] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for block comments (#1767). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters