@Model.ArticleText If ArticleText is just a text containi" /> @Model.ArticleText If ArticleText is just a text containi" /> @Model.ArticleText If ArticleText is just a text containi"/>

Markup ommited by Google Code Prettify

72 Views Asked by At

In my view I have following piece of code:

<pre class="prettyprint linenums lang-cs">
    @Model.ArticleText
</pre>

If ArticleText is just a text containing code syntax, for example:

"public ArticlesViewModel()
{
    public string ArticleName { get; set; }
}"

Then, in the view, this text is displayed as a pretty syntax-highlighted piece of code. But what if I want to add some comment to that text, for example:

"This is articles ViewModel:
public ArticlesViewModel()
{
    public string ArticleName { get; set; }
}"

Is there any markup I can wrap that comment with, that will be ignored by Code-Prettify?

1

There are 1 best solutions below

0
Mike Samuel On

From the code:

/**
* A class that indicates a section of markup that is not code, e.g. to allow
* embedding of line numbers within code listings.
* @const
*/
var PR_NOCODE = 'nocode'