We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,621 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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.

6
Contributors
14
Replies
2 Weeks
Discussion Span
1 Year Ago
Last Updated
15
Views
Question
Answered
Begginnerdev
Practically a Posting Shark
861 posts since Apr 2010
Reputation Points: 184
Solved Threads: 141
Skill Endorsements: 8

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
Administrator
21,343 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 367
Skill Endorsements: 119

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
Carpe per diem
Moderator
3,590 posts since Aug 2010
Reputation Points: 561
Solved Threads: 445
Skill Endorsements: 32

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
Administrator
21,343 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 367
Skill Endorsements: 119

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
Carpe per diem
Moderator
3,590 posts since Aug 2010
Reputation Points: 561
Solved Threads: 445
Skill Endorsements: 32

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.

deceptikon
Challenge Accepted
Administrator
3,426 posts since Jan 2012
Reputation Points: 822
Solved Threads: 473
Skill Endorsements: 56

I'll check it out. Thanks.

Reverend Jim
Carpe per diem
Moderator
3,590 posts since Aug 2010
Reputation Points: 561
Solved Threads: 445
Skill Endorsements: 32

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

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

Dani
The Queen of DaniWeb
Administrator
21,343 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 367
Skill Endorsements: 119

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
Administrator
21,343 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 367
Skill Endorsements: 119

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
Moderator
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
Administrator
21,343 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 367
Skill Endorsements: 119

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

Dani
The Queen of DaniWeb
Administrator
21,343 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 367
Skill Endorsements: 119

Sorry, Dani.

Begginnerdev
Practically a Posting Shark
861 posts since Apr 2010
Reputation Points: 184
Solved Threads: 141
Skill Endorsements: 8

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

pyTony
pyMod
Moderator
6,299 posts since Apr 2010
Reputation Points: 879
Solved Threads: 986
Skill Endorsements: 26

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

Dani
The Queen of DaniWeb
Administrator
21,343 posts since Feb 2002
Reputation Points: 1,555
Solved Threads: 367
Skill Endorsements: 119
Question Answered as of 10 Months Ago by Dani, Reverend Jim, Nick Evan and 2 others

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.1305 seconds using 2.73MB