Open lazarusA opened 3 months ago
We can't do that on our end unless we override REPL handling afaict. Probably better to figure out how HTMLwriter is getting ANSI and go from there...
mmm.... I was thinking something around this level:
function intelligent_language(lang::String)
if lang == "ansi"
"julia /julia>/"
elseif lang == "documenter-ansi"
"ansi"
elseif lang == "documenter-repl" # here? no... 😄
"ansi"
else
lang
end
end
In this case, I suspect we would have to do highlighting manually. We could write a backend ("formatter") for Highlights.jl to disgorge the appropriate highlight...
should we call
@ansi
if thelang
isrepl
, and of course only if the user is using DocumenterVitepress ? otherwise no nice printing will be available for them, and replacing everywhere@repl
for@ansi
is just a pain (from experience 😄 ).