Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP code snippets #14

Open
garethsb opened this issue May 12, 2021 · 2 comments
Open

HTTP code snippets #14

garethsb opened this issue May 12, 2021 · 2 comments
Assignees

Comments

@garethsb
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants