M-Yankov / OpenDevBlog

Open Dev Blog in progress...
MIT License
0 stars 0 forks source link

Showing highlighted code snippets #2

Open M-Yankov opened 5 years ago

M-Yankov commented 5 years ago

To be researched what is the best way to show high-lighted code snippets in a web page. To research how most of the websites works like: stackoverflow, github, monaco-editor in read only mode?

Where the syntax high-lighting will be executed - on client - on server ?

Here are some resources: https://stackoverflow.com/questions/6246245/using-syntax-highlight-from-github https://github.com/github/linguist http://pygments.org/ https://www.nuget.org/packages/pygments-net/ https://github.com/cvrajeesh/pygments-net

And is good to make repository in Github named: OpenDevBlog: Make project there and add task for researching.

Related to #1

M-Yankov commented 5 years ago

Check the code snippets here: https://www.automatetheplanet.com/rules-design-pattern/

M-Yankov commented 5 years ago

More colored code snippets: https://www.codebyamir.com/blog/create-excel-files-in-c-sharp

M-Yankov commented 5 years ago

This is used by dotnetcurry.com, https://www.hanselman.com/blog/ http://alexgorbatchev.com/SyntaxHighlighter/ https://github.com/syntaxhighlighter/syntaxhighlighter

Last commit is from Apr 10, 2017 (Updating ReadMe). No support. It is little buggy, because when double click on the code snippet, all keywords loses their color.

M-Yankov commented 5 years ago

https://github.com/jneen/rouge

M-Yankov commented 5 years ago

https://highlightjs.org/usage/ used here https://redux.js.org/basics/usage-with-react

M-Yankov commented 5 years ago

https://github.com/google/code-prettify --- Demo

M-Yankov commented 5 years ago

https://enlighterjs.org/ --- Demo

M-Yankov commented 5 years ago

https://microsoft.github.io/monaco-editor/playground.html#creating-the-editor-syntax-highlighting-for-html-elements Integrated from monaco - nice.

M-Yankov commented 2 years ago

https://github.com/aramk/crayon-syntax-highlighter, I saw it was used here: https://www.sqlshack.com/how-to-resolve-deadlocks-in-sql-server/