This project has moved and is read-only. For the latest updates, please go here.

VB.Net and <code> comments not showing up

Topics: User Forum
May 7, 2007 at 5:53 PM
Ok, I'm missing something. (Or at least I think I am.
I've used the <remarks><code>SomeCodeHere</code></remarks> before ( 1.1 and ndoc) without an problems.

But now its not showing the "Code" when the syntax is "Visual Basic", but showing the vb code when the syntax is C#.

Any ideas what I'm missing

chuck Snyder
May 7, 2007 at 8:09 PM
The help file builder adds code colorization. The default language is C#. You can add a "lang" attribute to the <code> tag to identify the language it should use to colorize it and also to which language filter it should be connected. If your code blocks are primarily one particular language, you can alter the default language by selecting the ComponentConfigurations project option, clicking the "..." to the right of it, and then configure the Code Block Component options. Then you only have to add "lang" to the blocks that differ from the default.

See the Custom Build Components help file topic and its sub-topic for full details and for more information on the other available <code> tag attributes that you can use.

May 8, 2007 at 5:15 AM
I think the default language being C# is not really a good thing, or at least it should be configurable. The "standard"
<code> does have the "lang" attribute and should be interpreted as such. In which case specifying the "lang" will mean
you need code colorization. Currently, <code> is the only XML Doc equivalent of HTML <pre> tag, and we use it a lot
for this.

Recently, I had some <code> specifying formula and has nothing to do with languages just to realize that each was being
treated as C#, so had to go back editing everything.
The "Anything else (i.e. "none") = No highlighting" should also include nothing.

Also, where you cannot match the language, it will be nice to simply use the text in the "lang" attribute as the title, that
is how some commercial tools handle it, instead on no displaying anything at all. We have languages like Delphi.NET,
IronPython, and recently IronRuby etc.

Best regards,