YorgunKelebek / Peer-Programming-Blog

Repository for Peer Programming Blog development
0 stars 0 forks source link

Code snippets - front-end rendering #5

Closed YorgunKelebek closed 4 years ago

YorgunKelebek commented 4 years ago

This is an interesting challenge, something I hadn't anticipated, rather foolishly...

Should we just use

 for code and escape for html?

Or use a tool such as this one: https://craig.is/making/rainbows

goofballLogic commented 4 years ago

Google have a library https://github.com/google/code-prettify/blob/master/docs/getting_started.md which looks ok - haven't ever tried to use it though...

goofballLogic commented 4 years ago

assets weigh in at almost 20 KB though - a bit heavy.

goofballLogic commented 4 years ago

We could just start by using <code>whatever</code> for now (monospacing) and add language support later I suppose

YorgunKelebek commented 4 years ago

whatever didn't handle whitespaces so opted for

whatever
which worked better.

Added a function for encoding html.

YorgunKelebek commented 4 years ago

Resolved for now by use of pre tag