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

Style julia> prompt #1639

Closed
fredrikekre opened this issue Jul 8, 2021 · 4 comments
Closed

Style julia> prompt #1639

fredrikekre opened this issue Jul 8, 2021 · 4 comments
Labels
Format: HTML Related to the default HTML output Type: Enhancement

Comments

@fredrikekre
Copy link
Member

Wouldn't it be nice to style the prompt in julia-repl? highglight.js marks the prompt as hljs-meta which is a tag that is used for misc other things too, for example.

However, top level meta, which for the julia-repl grammar is just the prompt, can be selected by

code.language-julia-repl > span.hljs-meta {
    // ...
}

(from highlightjs/highlight.js#3261 (comment)).

I suggest it should be colored with green just like the REPL.

@mortenpi mortenpi added Format: HTML Related to the default HTML output Type: Enhancement labels Jul 8, 2021
@mortenpi
Copy link
Member

mortenpi commented Jul 8, 2021

Sounds good, but are we sure that we never get any other spans with hljs-meta?

@fredrikekre
Copy link
Member Author

Yes, that is the only tag under the julia-repl grammar, everything else will be under plain julia: https://github.com/highlightjs/highlight.js/blob/1cb086b9509aa6af65e09a8936c5d93c9fe8178b/src/languages/julia-repl.js#L29-L38

@mortenpi
Copy link
Member

mortenpi commented Jul 8, 2021

Ah, yes, I see now. It puts a <span class="language-julia"> around the whole sub-language portion, so that CSS should be completely safe.

@kimikage
Copy link
Contributor

done in PR #1641

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Format: HTML Related to the default HTML output Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants