Skip to content

Commit 8d848dd

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 6f5cc5c commit 8d848dd

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
@@ -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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ $(eval $(call stdlib_builder,InteractiveUtils,Markdown))
109109
# 3-depth packages
110110
$(eval $(call stdlib_builder,LibGit2_jll,MbedTLS_jll LibSSH2_jll Artifacts Libdl))
111111
$(eval $(call stdlib_builder,LibCURL_jll,LibSSH2_jll nghttp2_jll MbedTLS_jll Zlib_jll Artifacts Libdl))
112-
$(eval $(call stdlib_builder,REPL,InteractiveUtils Markdown Sockets Unicode))
112+
$(eval $(call stdlib_builder,REPL,InteractiveUtils Markdown Sockets StyledStrings Unicode))
113113
$(eval $(call stdlib_builder,SharedArrays,Distributed Mmap Random Serialization))
114114
$(eval $(call stdlib_builder,TOML,Dates))
115115
$(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)