File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 8
8
The ` JuliaSyntaxHighlighting ` package builds on the ` StyledStrings ` and
9
9
` JuliaSyntax ` standard libraries to provide a simple utility for applying syntax
10
10
highlighting to text.
11
+
12
+ ``` julia-repl
13
+ julia> using JuliaSyntaxHighlighting: highlight, highlight!
14
+
15
+ julia> highlight("String(reinterpret(UInt8, [0x293a2061696c756a]))")
16
+ "String(reinterpret(UInt8, [0x293a2061696c756a]))" # Colored in the REPL
17
+
18
+ julia> Base.annotations(ans)
19
+ 11-element Vector{Tuple{UnitRange{Int64}, Pair{Symbol, Any}}}:
20
+ (1:6, :face => :julia_funcall)
21
+ (1:6, :face => :julia_type)
22
+ (7:7, :face => :julia_rainbow_paren_1)
23
+ (8:18, :face => :julia_funcall)
24
+ (19:19, :face => :julia_rainbow_paren_2)
25
+ (20:24, :face => :julia_type)
26
+ (27:27, :face => :julia_rainbow_bracket_1)
27
+ (28:45, :face => :julia_number)
28
+ (46:46, :face => :julia_rainbow_bracket_1)
29
+ (47:47, :face => :julia_rainbow_paren_2)
30
+ (48:48, :face => :julia_rainbow_paren_1)
31
+ ```
You can’t perform that action at this time.
0 commit comments