Skip to content

Commit

Permalink
Merge pull request ajaxorg#2583 from microtony/fix2250
Browse files Browse the repository at this point in the history
Fixes ajaxorg#2550 empty line comment continued
  • Loading branch information
nightwing committed Jul 1, 2015
2 parents 27240fb + 17f33b4 commit 44b1743
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion demo/kitchen-sink/docs/c_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@

using namespace std;

//
int main ()
{
int a, b=3; /* foobar */
a = b;
a = b; // single line comment\
continued
a+=2; // equivalent to a=a+2
cout << a;
#if VERBOSE >= 2
Expand Down
7 changes: 6 additions & 1 deletion lib/ace/mode/_test/tokens_c_cpp.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
["punctuation.operator",";"]
],[
"start"
],[
"start",
["comment","//"]
],[
"start",
["storage.type","int"],
Expand Down Expand Up @@ -114,7 +117,9 @@
["keyword.operator","="],
["text"," "],
["identifier","b"],
["punctuation.operator",";"]
["punctuation.operator",";"],
["text"," "],
["comment","// single line comment\\ continued"]
],[
"start",
["text"," "],
Expand Down
4 changes: 4 additions & 0 deletions lib/ace/mode/c_cpp_highlight_rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ var c_cppHighlightRules = function() {
this.$rules = {
"start" : [
{
token : "comment",
regex : "//$",
next : "start"
}, {
token : "comment",
regex : "//",
next : "singleLineComment"
Expand Down

0 comments on commit 44b1743

Please sign in to comment.