Comment fix for VB.NET code snippet
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.
Related Article: How to fix a Code Snippet
is a solved DaniWeb Community Feedback discussion thread by Nutster that has 2 replies, was last updated 7 months ago and has been tagged with the keywords: code, snippet, edit.
Begginnerdev
Practically a Posting Shark
893 posts since Apr 2010
Reputation Points: 198
Solved Threads: 149
Skill Endorsements: 9
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)
~~~
Dani
The Queen of DaniWeb
21,553 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 376
Skill Endorsements: 124
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.
Reverend Jim
Illigitimae non carborundum
3,740 posts since Aug 2010
Reputation Points: 585
Solved Threads: 469
Skill Endorsements: 33
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.
Dani
The Queen of DaniWeb
21,553 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 376
Skill Endorsements: 124
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.
Reverend Jim
Illigitimae non carborundum
3,740 posts since Aug 2010
Reputation Points: 585
Solved Threads: 469
Skill Endorsements: 33
deceptikon
Challenge Accepted
3,499 posts since Jan 2012
Reputation Points: 822
Solved Threads: 481
Skill Endorsements: 58
I'll check it out. Thanks.
Reverend Jim
Illigitimae non carborundum
3,740 posts since Aug 2010
Reputation Points: 585
Solved Threads: 469
Skill Endorsements: 33
but "~~~" is more than a little obscure
It's used by Github, Reddit, StackOverflow, etc. ...
Dani
The Queen of DaniWeb
21,553 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 376
Skill Endorsements: 124
OK, the formatting tutorial has been written!! Yay! There's a link to it in the top right of every editor on the site.
Dani
The Queen of DaniWeb
21,553 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 376
Skill Endorsements: 124
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?
Nick Evan
Cold-a$$ donkey
10,261 posts since Oct 2006
Reputation Points: 4,155
Solved Threads: 416
Skill Endorsements: 22
Is there no CSS on the page?? Try clearing your cache?
Dani
The Queen of DaniWeb
21,553 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 376
Skill Endorsements: 124
Hmm ... why is this thread marked solved? It seems rather up in the air to me!
Dani
The Queen of DaniWeb
21,553 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 376
Skill Endorsements: 124
Begginnerdev
Practically a Posting Shark
893 posts since Apr 2010
Reputation Points: 198
Solved Threads: 149
Skill Endorsements: 9
pyTony
pyMod
6,330 posts since Apr 2010
Reputation Points: 879
Solved Threads: 989
Skill Endorsements: 27
I'm going to have to put the code formatting notice set for all members, and not just newbies.
Dani
The Queen of DaniWeb
21,553 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 376
Skill Endorsements: 124
Question Answered as of 11 Months Ago by
Dani,
Reverend Jim,
Nick Evan
and 2 others