]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/julia-repl.js
1 /*! `julia-repl` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Description: Julia REPL sessions
8 Author: Morten Piibeleht <morten.piibeleht@gmail.com>
9 Website: https://julialang.org
13 The Julia REPL code blocks look something like the following:
15 julia> function foo(x)
18 foo (generic function with 1 method)
20 They start on a new line with "julia>". Usually there should also be a space after this, but
21 we also allow the code to start right after the > character. The code may run over multiple
22 lines, but the additional lines must start with six spaces (i.e. be indented to match
23 "julia>"). The rest of the code is assumed to be output from the executed code and will be
26 Using simply spaces to identify line continuations may get a false-positive if the output
27 also prints out six spaces, but such cases should be rare.
30 function juliaRepl(hljs
) {
35 className: 'meta.prompt',
39 // end the highlighting if we are on a new line and the line does not have at
40 // least six spaces in the beginning
46 // jldoctest Markdown blocks are used in the Julia manual and package docs indicate
47 // code snippets that should be verified when the documentation is built. They can be
48 // either REPL-like or script-like, but are usually REPL-like and therefore we apply
49 // julia-repl highlighting to them. More information can be found in Documenter's
50 // manual: https://juliadocs.github.io/Documenter.jl/latest/man/doctests.html
51 aliases: [ 'jldoctest' ],
59 export default hljsGrammar
;