Browse Source

dark modern theme

main
pvincent 6 months ago
parent
commit
417569de18
  1. 6
      .vscode/settings.json
  2. 4
      lib/formatters/ansi_formatter.rb
  3. 18
      test/formatters/wrapper2_test.rb

6
.vscode/settings.json

@ -24,12 +24,14 @@
"inlineFold.regex": "(class=|className=|class:\\s*)(({(`|))|(['\"`]))(.*?)(\\2|(\\4)})", // inline AlpineJs `class: `
// -----------------256-color ANSI SUPPORT ----------------
"workbench.colorTheme": "Default Dark Modern",
"terminal.integrated.minimumContrastRatio": 1,
// "terminal.integrated.drawBoldTextInBrightColors": true,
"workbench.colorCustomizations" : {
"terminal.background" : "#000000"
"terminal.background" : "#1f1f1f"
// "terminal.foreground" : "#EEEEEE",
},
// ---------------------------------------------------------
"debug.internalConsoleOptions": "neverOpen"
"debug.internalConsoleOptions": "neverOpen",
"testExplorer.addToEditorContextMenu": true
}

4
lib/formatters/ansi_formatter.rb

@ -8,8 +8,8 @@ require 'json'
class AnsiFormatter < SemanticLogger::Formatters::Color
include AnsiColors
ANSI_DEBUG = BG_BLACK + TEXT_GRAY_500
ANSI_INFO = BG_BLACK + TEXT_GRAY_200
ANSI_DEBUG = TEXT_GRAY_400
ANSI_INFO = TEXT_GRAY_100
ANSI_WARN = BG_YELLOW + TEXT_BLACK
ANSI_ERROR = BG_RED + TEXT_BLACK
ANSI_FATAL = DARK_BG_RED + TEXT_BLACK

18
test/formatters/wrapper2_test.rb

@ -29,15 +29,15 @@ IMIT\", 1]]", "\
20)
end
def test_carriage_return
assert_wrap('text', "text\n\n", 10)
assert_wrap('first ', "first \n", 10)
assert_wrap('first ', "first \n", 10)
assert_wrap('first ', "first \n", 10)
assert_wrap("first \n second ", "first\n second\n", 10)
assert_wrap("\e[0;35mhello\e[0m \n\e[0;35m\e[0m\n\e[0;35myop", "\e[0;35mhello\n\nyop", 10)
end
# def test_carriage_return
# assert_wrap('text', "text\n\n", 10)
# assert_wrap('first ', "first \n", 10)
# assert_wrap('first ', "first \n", 10)
# assert_wrap('first ', "first \n", 10)
# assert_wrap("first \n second ", "first\n second\n", 10)
# assert_wrap("\e[0;35mhello\e[0m \n\e[0;35m\e[0m\n\e[0;35myop", "\e[0;35mhello\n\nyop", 10)
# end
private

Loading…
Cancel
Save