1.11M Members

Comment fix for VB.NET code snippet

 
0
 

Found an odd fix for the bad comments for the CODE section for the vb.net forumns.

If you add an additional ' at the end of the commented line, it renders fine.

 
0
 

Yup ... it's attempting to syntax highlight with C/C++ style highlighting. To force VB-style highlighting, use fenced blocks like this:

~~~ vb
Code goes here (not indented)
~~~
 
0
 

That's somewhat different from the old style of code tags and definitely not intuitive. Is there any place that explains how the new system works? For example, as I am typing, the code tag in the first sentence is blue and underlined and everything following that is red. I don't know why. And the live preview shows absolutely no formatting changes.

 
0
 

Is there any place that explains how the new system works?

I don't have any of my own tutorials written yet (there will be a FAQ soon). However, we use standard Markdown language and there are plenty of tutorials on the web.

For example, as I am typing, the code tag in the first sentence is blue and underlined and everything following that is red.

HUH??

One issue that we DO have is that the JavaScript live preview currently does not support fenced tags. To avoid confusion until that support exists, I am avoiding promoting that feature. I just mentioned it because it solves the VB syntax bug.

 
0
 

I checked a few sites for "standard Markdown language" and didn't see any references to "~~~". Can you provide a link? Just my two cents but it seems like a step back to expect posters to have to learn another "language". I am familiar with HTML and don't have a problem with using tags to format things like lists, bolding, etc but "~~~" is more than a little obscure. I see too many posters who couldn't even bother to use the old style CODE and /CODE format.

 
0
 

I'll check it out. Thanks.

 
0
 

but "~~~" is more than a little obscure

It's used by Github, Reddit, StackOverflow, etc. ...

 
0
 

OK, the formatting tutorial has been written!! Yay! There's a link to it in the top right of every editor on the site.

 
0
 

OK, the formatting tutorial has been written!! Yay!

If you're referring to : http://www.daniweb.com/community/syntax ; that page isn't rendering properly for me. Bold text looks like normal text, headings and sub-heading look like normal text and there's no syntax-highlighting at all?

 
0
 

Is there no CSS on the page?? Try clearing your cache?

 
0
 

Hmm ... why is this thread marked solved? It seems rather up in the air to me!

 
0
 

Sorry, Dani.

 
0
 

I'm going to have to put the code formatting notice set for all members, and not just newbies.

Question Answered as of 2 Years Ago by Dani, Reverend Jim, Nick Evan and 2 others
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article