[ art / civ / cult / cyb / diy / drg / feels / layer / lit / λ / q / r / sci / sec / tech / w / zzz ] archive provided by lainchan.jp

lainchan archive - /q/ - 12537



File: 1482262042411.png (28.87 KB, 300x298, lisplogo.png)

No.12537

I have a humble request regarding the board software, provided it's not too much trouble:

Can we please stop highlighting between single quotes in code blocks, given that lisp is tremendously popular on /λ/, and, well, see for yourself:

(defun foo ()
(if (mapcar (lambda (x) (format t "~a " x)) '(is this not infuriating?))
t
nil))

  No.12539

Are you sure this isn't a problem on your end?

All of the code looks the same, to me. It's just a simple monospace font.

  No.12541

>>12539
What theme are you using? If you're using fauux, you won't see it.

But AFAIK, this isn't on my end: it doesn't happen on any other site, seems to happen across browsers, and the colors change with the theme.

If you're wondering what I'm talking about, all the text after the ' mark in the code block should be colored green. This is the error.

  No.12546

>>12539
There's syntax highlighting for code if you enable JavaScript.

  No.12555

>>12537
I am working on this, it requires installing all the languages for prettify.js which is used to generate the syntax highlighting.

The original implementation doesn't support the language packs https://github.com/lainchan/lainchan/commit/7c7a465966ea66d2b5ebbcf6567e7b04cbd3f9f2.

  No.12564

speaking of, the question thread in /λ/ reached it's limit, just so the mod knows (he doesn't seem to have noticed). Thanks and sorry if I'm doing it wrong

  No.12573

>>12537
This was too much trouble, however I have migrated our previous code syntax highlighting solution from google-code-prettify to highlight.js, in order to get better language support.

Currently the auto detection for code blocks posted without language specifier in first line is poor to say the least.

I can improve it by restricting the language implementations using the configure method of highlight.js but I haven't done so yet, because I don't have a list of desired languages to restrict it to. Suggestions welcome.

Also light.css is just the highlight.js default.css and dark.css is just higlight.js dark.css, so if people want different stylesheets, find one you like from https://github.com/isagalaev/highlight.js/tree/master/src/styles and suggest it.

The changes haven't been committed to the git repository yet, but that will happen shortly.

  No.12596

>>12573
It works now. Thanks Appleman.

  No.12600

+1 looks good applemayne