forked from highlightjs/highlight.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request highlightjs#647 from suever/matlab_block_comments
Adds support for multi-line comments in Matlab
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 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
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
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,27 @@ | ||
<span class="hljs-comment">%{ evaluate_this = false; % Evaluated as regular single-line comment</span> | ||
evaluate_this = true; | ||
<span class="hljs-comment">%}</span> | ||
|
||
evaluate_this = true; | ||
<span class="hljs-comment"> | ||
%{ | ||
This is a multi-line comment | ||
evaluate_this = false; | ||
%{ | ||
%} | ||
</span> | ||
evaluate_this = true; | ||
<span class="hljs-comment"> | ||
%{ | ||
Opening (%{) and closing (%}) block comment markers can be within a comment block | ||
%} | ||
</span> | ||
evaluate_this = true; | ||
<span class="hljs-comment"> | ||
%{ | ||
Indented block comments can be indented | ||
or not | ||
and whitespace can be added before or after the %{ and %} | ||
%} | ||
</span> | ||
evaluate_this = true; |
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,27 @@ | ||
%{ evaluate_this = false; % Evaluated as regular single-line comment | ||
evaluate_this = true; | ||
%} | ||
|
||
evaluate_this = true; | ||
|
||
%{ | ||
This is a multi-line comment | ||
evaluate_this = false; | ||
%{ | ||
%} | ||
|
||
evaluate_this = true; | ||
|
||
%{ | ||
Opening (%{) and closing (%}) block comment markers can be within a comment block | ||
%} | ||
|
||
evaluate_this = true; | ||
|
||
%{ | ||
Indented block comments can be indented | ||
or not | ||
and whitespace can be added before or after the %{ and %} | ||
%} | ||
|
||
evaluate_this = true; |