소스 검색

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

tags/v0.10.6
Jérôme Deuchnord 2 년 전
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

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"]),
"th": lambda t: colored(t, "white", attrs=["bold"]),
"th": lambda t: colored(t, attrs=["bold"]),
"strong": lambda t: colored(t, attrs=["bold"]),
"em": lambda t: colored(t, attrs=["dark"]),
}

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

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


불러오는 중...
취소
저장