Thursday 4 July 2019

Code format and beautifier for code snippets in blogger.com

In almost all my blog posts I show code snippets or command line examples. To make code examples more readable they need to have code highlighting. One very nice and easy option that I liked for code highlighting is to use github gists. On my github I created one multi-file gist. To include only one file from multi-file gist use code sample below. Replace name before js with one provided by gist’s tag. Replace FileName with name of the file in the gist.

The sample of commands I like to show in the sample box that is not prettifying the text. Use the sample code below to wrap the sample command between “pre” tags.

Example of the sample command box.
C:\run_me.exe

No comments:

Post a Comment