Skip to content

Incorrect syntax highlighting of terminal code-cells #10335

@rsokolewicz

Description

@rsokolewicz

Describe the problem

On install related pages we have a few code-cells that show some code that the user has to write in their terminal. Something goes wrong with the syntax highlighting:

image

where some keywords are mistakenly highlighted with a different color. Also, the blue and purple are difficult to read against a black background.

The code cell in the corresponding markdown file looks like

   ```console
   $ which bash file mkdir rm which
   ```

and the html block looks like:

<code><span class="gp">$</span><span class="w"> </span>which bash file <span class="nb">mkdir rm </span>which
<span class="go">/bin/bash
/usr/bin/file
/bin/mkdir
/bin/rm
which: shell built-in command
</span></code>

maybe the span classes provide a hint where it goes wrong :D

Expected fix

No response

On which browser(s) did you experience this issue?

Chrome, Microsoft Edge

Additional context

No response

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.

Metadata

Metadata

Assignees

Labels

e1-hoursEffort: < 8 hrsinfra.designRelates to the design of docs.flutter.devinfra.structureRelates to the tools that create docs.flutter.devp1-highMajor but not urgent concern: Resolve in months. Update each month.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions