Raised This Month: $ Target: $400
 0% 

Help with code snippets in a readme?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SandrilaFriman
New Member
Join Date: Jun 2022
Old 07-07-2022 , 02:00   Help with code snippets in a readme?
Reply With Quote #1

Not a dev, but a teacher who is teaching javascript/react. I am creating a readme file in vscode, and inside of it I am including some example code (it is a tutorial for students to follow along). Is there a way I can make the code look like it would if it was in a file?

By this I mean you can't really differentiate between the text in the readme and the code snippets? It would look much better if they could see the code snippets with colour (and importantly it will look similar echatspin to what they end up typing in their own projects)

Hoping someone can help.

Last edited by SandrilaFriman; 08-10-2022 at 08:31.
SandrilaFriman is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-07-2022 , 23:31   Re: Help with code snippets in a readme?
Reply With Quote #2

This site is not the best place to ask about this type of question and it probably belongs in the Off-Topic forum if you insist on posting here. This is a forum for writing plugins for Half-Life games.

A readme is typically a plain text file which cannot have color. If you're using some sort of markup language in your readme then you have to see what your parser supports. If you're using Markdown you can look here. The VSCode Markdown preview feature (make sure your file is set as Markdown) supports syntax highlighting. If you're using GitHub, I assume that they also support it also but you can easily find that out in GitHub's documentation.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:16.


Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Theme made by Freecode