Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is no HTML "inverse" style, so we have to fake it by explicitly swapping foreground and background colors. However, this is a problem if the character does not have explicit foreground and background colors, and if the <pre> tag's foreground and background were also not set. So, we will introduce a new option to give the fallback colors in that case.
- Loading branch information
1 parent
8cc7953
commit f323d77
Showing
6 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<pre> | ||
This is <span style="background-color: black; color: white">inverse text</span> with default fg and bg. | ||
<span style="color: #cd0000">This is </span><span style="color: white; background-color: #cd0000">inverse text</span><span style="color: #cd0000"> with red fg and default bg.</span> | ||
<span style="background-color: #cd0000">This is </span><span style="background-color: black; color: #cd0000">inverse text</span><span style="background-color: #cd0000"> with default fg and red bg.</span> | ||
<span style="background-color: #cd0000; color: #00cd00">This is </span><span style="background-color: #00cd00; color: #cd0000">inverse text</span><span style="background-color: #cd0000; color: #00cd00"> with green fg and red bg.</span> | ||
</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This is [7minverse text[27m with default fg and bg. | ||
[31mThis is [7minverse text[27m with red fg and default bg.[m | ||
[41mThis is [7minverse text[27m with default fg and red bg.[m | ||
[32;41mThis is [7minverse text[27m with green fg and red bg.[m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters