Closed doda-zz closed 10 years ago
the <code>
tags still have the huge regular font, although I don't feel qualified making design decisions on the BDesignFL's project :) it already has github style syntax highlighting courtesy of highlight.js
. other than that it's probably best to mimic github's sideways scrolling instead of line breaking
@doda Any reason why you chose to use use showdown + santizier vs something like chjj/marked?
@doda (asking for curiosity, not rhetorically)
looks good! i didnt know about it. what do you think about pushing the work to the client? i think i've detailed why i personally think it's preferable but i'd be curious to know what your opinions are.
Has upsides and downsides, you hit them all.
With clientside, I can't easily cache rendered gists, and it is difficult to do private gists (but not impossible).
My hacking time is quite limited right now due to newborn, but I'm slowly working out a solution and pushing it.
Syntax highlighting is implemented in a034ca16c9d814f7d099ec5664fab02eba2e50b7
Some changes coming up that make clientside not viable. Closing for now!
this pushes all the work of requesting the Gist's contents, rendering them, applying the correct syntax highlighting and sanitizing the HTML to the client.
general thoughts reg. this approach
Advantages:
castratelimit the web app to 2500 requests / hour (5000 / 2), if the client does the work of querying GitHub we can pull in however much information we wantDisadvantages:
In general I think it's a great improvement since it greatly simplifies everything that happens on the server and even though I prefer doing Python over JS, it's nicer to have everything in one place instead of having it split between python on the server and JS on the client and constantly making sure the 2 match up.