1,105,423 Community Members

Comment fix for VB.NET code snippet

Member Avatar
Begginnerdev
Veteran Poster
1,142 posts since Apr 2010
Reputation Points: 251 [?]
Q&As Helped to Solve: 191 [?]
Skill Endorsements: 15 [?]
 
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.

Member Avatar
Dani
The Queen of DaniWeb
20,573 posts since Feb 2002
Reputation Points: 1,356 [?]
Q&As Helped to Solve: 931 [?]
Skill Endorsements: 204 [?]
Administrator
Featured
Sponsor
 
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)
~~~
Member Avatar
Reverend Jim
Noli mentula
5,460 posts since Aug 2010
Reputation Points: 761 [?]
Q&As Helped to Solve: 653 [?]
Skill Endorsements: 51 [?]
Moderator
Featured
 
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.

Member Avatar
Dani
The Queen of DaniWeb
20,573 posts since Feb 2002
Reputation Points: 1,356 [?]
Q&As Helped to Solve: 931 [?]
Skill Endorsements: 204 [?]
Administrator
Featured
Sponsor
 
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.

Member Avatar
Reverend Jim
Noli mentula
5,460 posts since Aug 2010
Reputation Points: 761 [?]
Q&As Helped to Solve: 653 [?]
Skill Endorsements: 51 [?]
Moderator
Featured
 
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.

Member Avatar
deceptikon
Eternally Awesome
4,696 posts since Jan 2012
Reputation Points: 1,341 [?]
Q&As Helped to Solve: 689 [?]
Skill Endorsements: 104 [?]
Administrator
Featured
 
0
 

It's not standard Markdown, it's one of the forks with extensions: https://github.com/egil/php-markdown-extra-extended#readme. In particular, the ~~~ syntax is for fenced code blocks.

Member Avatar
Reverend Jim
Noli mentula
5,460 posts since Aug 2010
Reputation Points: 761 [?]
Q&As Helped to Solve: 653 [?]
Skill Endorsements: 51 [?]
Moderator
Featured
 
0
 

I'll check it out. Thanks.

Member Avatar
Dani
The Queen of DaniWeb
20,573 posts since Feb 2002
Reputation Points: 1,356 [?]
Q&As Helped to Solve: 931 [?]
Skill Endorsements: 204 [?]
Administrator
Featured
Sponsor
 
0
 

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

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

Member Avatar
Dani
The Queen of DaniWeb
20,573 posts since Feb 2002
Reputation Points: 1,356 [?]
Q&As Helped to Solve: 931 [?]
Skill Endorsements: 204 [?]
Administrator
Featured
Sponsor
 
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.

Member Avatar
Nick Evan
Industrious Poster
4,827 posts since Oct 2006
Reputation Points: 4,005 [?]
Q&As Helped to Solve: 560 [?]
Skill Endorsements: 30 [?]
Team Colleague
Featured
 
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?

Member Avatar
Dani
The Queen of DaniWeb
20,573 posts since Feb 2002
Reputation Points: 1,356 [?]
Q&As Helped to Solve: 931 [?]
Skill Endorsements: 204 [?]
Administrator
Featured
Sponsor
 
0
 

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

Member Avatar
Dani
The Queen of DaniWeb
20,573 posts since Feb 2002
Reputation Points: 1,356 [?]
Q&As Helped to Solve: 931 [?]
Skill Endorsements: 204 [?]
Administrator
Featured
Sponsor
 
0
 

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

Member Avatar
Begginnerdev
Veteran Poster
1,142 posts since Apr 2010
Reputation Points: 251 [?]
Q&As Helped to Solve: 191 [?]
Skill Endorsements: 15 [?]
 
0
 

Sorry, Dani.

Member Avatar
pyTony
pyMod
6,104 posts since Apr 2010
Reputation Points: 818 [?]
Q&As Helped to Solve: 1,056 [?]
Skill Endorsements: 42 [?]
Moderator
Featured
 
0
 

The information on new tagging scheme have not reached even members who have posts under belt allready.
http://www.daniweb.com/software-development/cpp/threads/420810/y-linked-list#post1795231

Member Avatar
Dani
The Queen of DaniWeb
20,573 posts since Feb 2002
Reputation Points: 1,356 [?]
Q&As Helped to Solve: 931 [?]
Skill Endorsements: 204 [?]
Administrator
Featured
Sponsor
 
0
 

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

Question Answered as of 1 Year 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