inline code is not shown with gray background (default)

david.a.rogers's Avatar

david.a.rogers

14 Dec, 2023 09:44 PM

I have syntax highlighting set to default. Code blocks (triple backticks on separate lines) render as expected with monospace font and gray background.

But inline code (single backticks on the same line) render with a monospace font but without a gray background. Why the difference and how do I get marked to display inline code with a gray background?

  1. Support Staff 1 Posted by Brett on 14 Dec, 2023 11:07 PM

    Brett's Avatar

    This will be entirely determined by what Style you're using. Code spans
    (<code>) are styled differently than code blocks (<pre><code>) and each
    theme can do this differently. You can easily affect all code spans by
    going to Preferences->Style->Additional CSS and adding something like:

    #wrapper code { background: #eee }

    Or whatever CSS you like.

    -Brett

    On 14 Dec 2023, at 15:46, david.a.rogers wrote:

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac