Skip to content

Commit 30ccace

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 1552116 commit 30ccace

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

doc/Manifest.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
205205
version = "1.11.0"
206206

207207
[[deps.REPL]]
208-
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
208+
deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"]
209209
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
210210
version = "1.11.0"
211211

@@ -242,6 +242,9 @@ deps = ["ArgTools", "SHA"]
242242
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
243243
version = "1.10.0"
244244

245+
[[deps.StyledStrings]]
246+
uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b"
247+
245248
[[deps.Test]]
246249
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
247250
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

pkgimage.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ $(eval $(call stdlib_builder,InteractiveUtils,Markdown))
111111
# 3-depth packages
112112
$(eval $(call stdlib_builder,LibGit2_jll,MbedTLS_jll LibSSH2_jll Artifacts Libdl))
113113
$(eval $(call stdlib_builder,LibCURL_jll,LibSSH2_jll nghttp2_jll MbedTLS_jll Zlib_jll Artifacts Libdl))
114-
$(eval $(call stdlib_builder,REPL,InteractiveUtils Markdown Sockets Unicode))
114+
$(eval $(call stdlib_builder,REPL,InteractiveUtils Markdown Sockets StyledStrings Unicode))
115115
$(eval $(call stdlib_builder,SharedArrays,Distributed Mmap Random Serialization))
116116
$(eval $(call stdlib_builder,TOML,Dates))
117117
$(eval $(call stdlib_builder,Test,Logging Random Serialization InteractiveUtils))

stdlib/REPL/Project.toml

+1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function __init__()
9191
return nothing
9292
end
9393

94-
using Base.Meta, Sockets
94+
using Base.Meta, Sockets, StyledStrings
9595
import InteractiveUtils
9696

9797
export

stdlib/REPL/src/precompile.jl

+1
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)