Skip to content

Commit 2de89d9

Browse files
committed
Load StyledStrings in REPL
By loading the StyledStrings stdlib in REPL, we load the privateered print/show methods for the Annotated{String,Char} types defined there. This is nice to have, because it means that styled annotated strings can be constructed in Base and elsewhere without loading the StyledStrings stdlib, but they will be displayed as intended in the REPL.
1 parent 59d4450 commit 2de89d9

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

doc/Manifest.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ deps = ["Unicode"]
9494
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
9595

9696
[[deps.REPL]]
97-
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
97+
deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"]
9898
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
9999

100100
[[deps.Random]]
@@ -111,6 +111,9 @@ uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
111111
[[deps.Sockets]]
112112
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
113113

114+
[[deps.StyledStrings]]
115+
uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b"
116+
114117
[[deps.Test]]
115118
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
116119
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

pkgimage.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ $(eval $(call stdlib_builder,InteractiveUtils,Markdown))
107107
# 3-depth packages
108108
$(eval $(call stdlib_builder,LibGit2_jll,MbedTLS_jll LibSSH2_jll Artifacts Libdl))
109109
$(eval $(call stdlib_builder,LibCURL_jll,LibSSH2_jll nghttp2_jll MbedTLS_jll Zlib_jll Artifacts Libdl))
110-
$(eval $(call stdlib_builder,REPL,InteractiveUtils Markdown Sockets Unicode))
110+
$(eval $(call stdlib_builder,REPL,InteractiveUtils Markdown Sockets StyledStrings Unicode))
111111
$(eval $(call stdlib_builder,SharedArrays,Distributed Mmap Random Serialization))
112112
$(eval $(call stdlib_builder,TOML,Dates))
113113
$(eval $(call stdlib_builder,Test,Logging Random Serialization InteractiveUtils))

stdlib/REPL/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ version = "1.11.0"
66
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
77
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
88
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
9+
StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b"
910
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
1011

1112
[extras]

stdlib/REPL/src/REPL.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ end
3434
Base.Experimental.@optlevel 1
3535
Base.Experimental.@max_methods 1
3636

37-
using Base.Meta, Sockets
37+
using Base.Meta, Sockets, StyledStrings
3838
import InteractiveUtils
3939

4040
export

stdlib/REPL/src/precompile.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ end
1616
using Base.Meta
1717

1818
import Markdown
19+
import StyledStrings
1920

2021
## Debugging options
2122
# Disable parallel precompiles generation by setting `false`

0 commit comments

Comments
 (0)