Skip to content

Commit bec6efd

Browse files
committed
Revert "Highlight julia-repl code in Markdown specially (#54423)"
This reverts commit 6582eaa.
1 parent f211a77 commit bec6efd

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

stdlib/Markdown/src/Markdown.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const MARKDOWN_FACES = [
4747
:markdown_h6 => Face(height=1.05, inherit=:markdown_header),
4848
:markdown_admonition => Face(weight=:bold),
4949
:markdown_code => Face(inherit=:code),
50-
:markdown_julia_prompt => Face(inherit=:repl_prompt_julia),
5150
:markdown_footnote => Face(inherit=:bright_yellow),
5251
:markdown_hrule => Face(inherit=:shadow),
5352
:markdown_inlinecode => Face(inherit=:markdown_code),

stdlib/Markdown/src/render/terminal/render.jl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,6 @@ end
118118
function term(io::IO, md::Code, columns)
119119
code = if md.language == "julia"
120120
highlight(md.code)
121-
elseif md.language == "julia-repl" || Base.startswith(md.language, "jldoctest")
122-
hl = AnnotatedString(md.code)
123-
for (; match) in eachmatch(r"(?:^|\n)julia>", hl)
124-
StyledStrings.face!(match, :markdown_julia_prompt)
125-
afterprompt = match.offset + ncodeunits(match) + 1
126-
_, exprend = Meta.parse(md.code, afterprompt, raise = false)
127-
highlight!(hl[afterprompt:prevind(md.code, exprend)])
128-
if (nextspace = findnext(' ', md.code, exprend)) |> !isnothing
129-
nextword = hl[exprend:prevind(hl, nextspace)]
130-
if nextword == "ERROR:"
131-
StyledStrings.face!(nextword, :error)
132-
end
133-
end
134-
end
135-
hl
136121
elseif md.language == "styled"
137122
styled(md.code)
138123
else

0 commit comments

Comments
 (0)