Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/rich/_export_format.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-06-07 06:35 +0000

1CONSOLE_HTML_FORMAT = """\ 

2<!DOCTYPE html> 

3<head> 

4<meta charset="UTF-8"> 

5<style> 

6{stylesheet} 

7body {{ 

8 color: {foreground}; 

9 background-color: {background}; 

10}} 

11</style> 

12</head> 

13<html> 

14<body> 

15 <pre style="font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><code>{code}</code></pre> 

16</body> 

17</html> 

18""" 

19 

20CONSOLE_SVG_FORMAT = """\ 

21<svg class="rich-terminal" viewBox="0 0 {width} {height}" xmlns="http://www.w3.org/2000/svg"> 

22 <!-- Generated with Rich https://www.textualize.io --> 

23 <style> 

24 

25 @font-face {{ 

26 font-family: "Fira Code"; 

27 src: local("FiraCode-Regular"), 

28 url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Regular.woff2") format("woff2"), 

29 url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Regular.woff") format("woff"); 

30 font-style: normal; 

31 font-weight: 400; 

32 }} 

33 @font-face {{ 

34 font-family: "Fira Code"; 

35 src: local("FiraCode-Bold"), 

36 url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Bold.woff2") format("woff2"), 

37 url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Bold.woff") format("woff"); 

38 font-style: bold; 

39 font-weight: 700; 

40 }} 

41 

42 .{unique_id}-matrix {{ 

43 font-family: Fira Code, monospace; 

44 font-size: {char_height}px; 

45 line-height: {line_height}px; 

46 font-variant-east-asian: full-width; 

47 }} 

48 

49 .{unique_id}-title {{ 

50 font-size: 18px; 

51 font-weight: bold; 

52 font-family: arial; 

53 }} 

54 

55 {styles} 

56 </style> 

57 

58 <defs> 

59 <clipPath id="{unique_id}-clip-terminal"> 

60 <rect x="0" y="0" width="{terminal_width}" height="{terminal_height}" /> 

61 </clipPath> 

62 {lines} 

63 </defs> 

64 

65 {chrome} 

66 <g transform="translate({terminal_x}, {terminal_y})" clip-path="url(#{unique_id}-clip-terminal)"> 

67 {backgrounds} 

68 <g class="{unique_id}-matrix"> 

69 {matrix} 

70 </g> 

71 </g> 

72</svg> 

73""" 

74 

75_SVG_FONT_FAMILY = "Rich Fira Code" 

76_SVG_CLASSES_PREFIX = "rich-svg"