AMWA-TV / nmos-render-layouts

Layouts and CSS for AMWA NMOS documentation
Apache License 2.0
0 stars 0 forks source link

HTTP code snippets #14

Open garethsb opened 3 years ago

garethsb commented 3 years ago

We use triple-backtick blocks to render code snippets in the specs. We've recently checked that these all use format hints like json appropriately, which gets us syntax highlighting. I notice that the http ones, e.g. on the APIs - Server Side Implementation Notes pages in the IS-04 v1.3.x and IS-05 v1.1.x branches, render nicely on GitHub, but in red on specs.amwa.tv, which looks a bit odd. Is this something which could be resolved with just a CSS tweak, or does it indicate something else?

garethsb commented 3 years ago

Hmm, even the JSON snippets render with reddish text, but they only use the light red background to indicate syntax errors, e.g. where snippets have ... to indicate elision. The HTTP snippets in the server implementation notes have the light red background throughout.

garethsb commented 3 years ago

As discussed on Slack, the issue is that (unlike the GitHub one) the lexer for ruby-rouge http expects the snippet to begin with a whole HTTP request or response line.