-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of ANSI foreground/background inversion is incorrect #2487
Comments
The conversion to HTML is handled by https://github.com/JuliaDocs/ANSIColoredPrinters.jl I believe. cc @kimikage |
This is essentially due to the problem that default background and foreground colors (i.e., default inverse colors) are not known at the time the escape codes are interpreted in ANSIColoredPrinters.jl. The actual colors vary with the CSS of the container. I would like to examine ways to make it easier to solve this problem with CSS. |
Linking to #2488 too, something that might be of interest to ANSIColoredPrinters in the future is refactoring to work via applying BTW, it seems that ANSIColoredPrinters has a parser error when it encounters OSC 8 links. |
As I've been doing a round of improvements to the StyledStrings docs, it occurred to me that it would be good to show some styled content. One of the examples I showed was with background colour. Documenter could obtain HTML representations of AnnotatedStrings with the
show(::IO, ::MIME"text/html", ::AnnotatedString)
method provided by StyledStrings (and I will make another issue on this), but for now I've tried using@repl; ansicolor=true
blocks.When used with
styled"{magenta:some {inverse:inverse} text}"
, Documenter using anIO
with:color
would see\e[35msome \e[7minverse\e[27m text\e[39m
and produces:However, this is not correct. In the terminal one sees this:
and StyledStrings produces the following HTML:
The text was updated successfully, but these errors were encountered: