Skip to content

Markdown code highlighting in terminal styling regression: REPL examples blend in too much with code #60541

@fingolfin

Description

@fingolfin

I think this is due to PR #51928 (specifically commit 337630b) by @tecosaur . To be clear, I overall like the idea put forward in that PR but I feel the styling needs to improve, yet I also couldn't figure out how to do it myself, so I am resorting to an issue.

I'll try to illustrate my point with a screenshot out of the help text for sum.

In Julia 1.12, I see this:

Image

Here is very clear which parts are code/REPL examples, and which parts are text.

With master, the outputs of the commands look just like the text surrounding them:

Image

One thing that is better is that the julia> prompts in the examples now look different from regular prompts, thanks to PR #55455.

Ideally, the "outputs" would use a different styling, too. E.g. italics (then the italics bits would all be by the system, and the regular text by the user), or some kind of gray, or perhaps the good old "azure"/"turquoise"/whatever color from 1.12 and before.

Perhaps the user inputs also should have a different base color, but thanks to the prompts that's less of an issue in my eye.

Apparently I am not the first to "complain" about this, given that on the 1.12 branch this was addressed by @tecosaur via acdc09f from PR #58408. If we can't find a better solution, that PR could just be applied to 1.13 and master.


Granted, in this example it is not terrible that the colors are not distinct, but I have examples in packages where I find it much more problematic. E.g. longer examples with text in the middle, where it becomes difficult to visually pick out the text, which is annoying if you then try to copy&paste code from the example into the REPL, only to find that you copied some text in the middle along. Obviously not a major issue, but an annoying papercut that we didn't have before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions