pawelmalak / snippet-box

Snippet Box is a simple self-hosted app for organizing your code snippets. It allows you to easily create, edit, browse and manage your snippets in various languages.
MIT License
977 stars 80 forks source link

Feature Request: Syntax highlighting #14

Closed bertiewils closed 3 years ago

bertiewils commented 3 years ago

It would be nice to have syntax highlighting for code when viewing a snippet.

Something like https://github.com/highlightjs/highlight.js could work.

The language field could stay an input field, with some logic to see if the entered language = one of the supported aliases.

You could then have a line below the language field, something like:

Syntax highlighting provided by highlight.js. See the supported languages for valid options.

The alternative would be to make the language field a dropdown of supported languages, now that there are tags separately.

Thank you for a great project!

bertiewils commented 3 years ago

That's perfect, thank you!