瀏覽代碼

fix(colors): use colors adapted on both dark and light background

tags/v0.10.6
Jérôme Deuchnord 3 年之前
committed by Jérôme Deuchnord
父節點
當前提交
9bdb490435
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      _kosmorro/dumper.py

+ 3
- 3
_kosmorro/dumper.py 查看文件

@@ -145,14 +145,14 @@ class TextDumper(Dumper):
return text return text


styles = { styles = {
"h1": lambda t: colored(t, "yellow", attrs=["bold"]), "h1": lambda t: colored(t, "green", attrs=["bold"]),
"h2": lambda t: colored(t, "magenta", attrs=["bold"]), "h2": lambda t: colored(t, "magenta", attrs=["bold"]),
"th": lambda t: colored(t, "white", attrs=["bold"]), "th": lambda t: colored(t, attrs=["bold"]),
"strong": lambda t: colored(t, attrs=["bold"]), "strong": lambda t: colored(t, attrs=["bold"]),
"em": lambda t: colored(t, attrs=["dark"]), "em": lambda t: colored(t, attrs=["dark"]),
} }


return styles[tag](text) return styles.get(tag, lambda t: t)(text)


def stringify_ephemerides(self) -> str: def stringify_ephemerides(self) -> str:
data = [] data = []


||||||
x
 
000:0
Loading…
取消
儲存