streamdown 0.14.0__tar.gz → 0.16.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. {streamdown-0.14.0 → streamdown-0.16.0}/PKG-INFO +28 -28
  2. {streamdown-0.14.0 → streamdown-0.16.0}/README.md +27 -28
  3. streamdown-0.16.0/assets/logo.png +0 -0
  4. streamdown-0.16.0/assets/logo.svg +116 -0
  5. {streamdown-0.14.0 → streamdown-0.16.0}/pyproject.toml +2 -1
  6. streamdown-0.16.0/python-go.png +0 -0
  7. {streamdown-0.14.0 → streamdown-0.16.0}/streamdown/sd.py +10 -5
  8. {streamdown-0.14.0 → streamdown-0.16.0}/tests/chunk-buffer.sh +1 -1
  9. streamdown-0.16.0/tests/pvgo_512.jpg +0 -0
  10. streamdown-0.16.0/tests/pythonvgo.md +187 -0
  11. {streamdown-0.14.0 → streamdown-0.16.0}/.gitignore +0 -0
  12. {streamdown-0.14.0 → streamdown-0.16.0}/.vimrc +0 -0
  13. {streamdown-0.14.0 → streamdown-0.16.0}/24-bit-color.sh +0 -0
  14. {streamdown-0.14.0 → streamdown-0.16.0}/LICENSE.MIT +0 -0
  15. {streamdown-0.14.0 → streamdown-0.16.0}/configurable.png +0 -0
  16. {streamdown-0.14.0 → streamdown-0.16.0}/copyable.png +0 -0
  17. {streamdown-0.14.0 → streamdown-0.16.0}/dunder.png +0 -0
  18. {streamdown-0.14.0 → streamdown-0.16.0}/error.txt +0 -0
  19. {streamdown-0.14.0 → streamdown-0.16.0}/newdir/file_0.py +0 -0
  20. {streamdown-0.14.0 → streamdown-0.16.0}/newdir/file_1.rb +0 -0
  21. {streamdown-0.14.0 → streamdown-0.16.0}/newdir/file_2.jl +0 -0
  22. {streamdown-0.14.0 → streamdown-0.16.0}/passthrough.py +0 -0
  23. {streamdown-0.14.0 → streamdown-0.16.0}/somelog.txt +0 -0
  24. {streamdown-0.14.0 → streamdown-0.16.0}/streamdown/__init__.py +0 -0
  25. {streamdown-0.14.0 → streamdown-0.16.0}/streamdown/plugins/README.md +0 -0
  26. {streamdown-0.14.0 → streamdown-0.16.0}/streamdown/plugins/latex.py +0 -0
  27. {streamdown-0.14.0 → streamdown-0.16.0}/streamdown/scrape/file_0.py +0 -0
  28. {streamdown-0.14.0 → streamdown-0.16.0}/streamdown/scrape/file_1.js +0 -0
  29. {streamdown-0.14.0 → streamdown-0.16.0}/streamdown/scrape/file_2.cpp +0 -0
  30. {streamdown-0.14.0 → streamdown-0.16.0}/streamdown/tt.mds +0 -0
  31. {streamdown-0.14.0 → streamdown-0.16.0}/table.png +0 -0
  32. {streamdown-0.14.0 → streamdown-0.16.0}/temp.py +0 -0
  33. {streamdown-0.14.0 → streamdown-0.16.0}/test.py +0 -0
  34. {streamdown-0.14.0 → streamdown-0.16.0}/test_input.md +0 -0
  35. {streamdown-0.14.0 → streamdown-0.16.0}/tests/README.md +0 -0
  36. {streamdown-0.14.0 → streamdown-0.16.0}/tests/block.md +0 -0
  37. {streamdown-0.14.0 → streamdown-0.16.0}/tests/code.md +0 -0
  38. {streamdown-0.14.0 → streamdown-0.16.0}/tests/example.md +0 -0
  39. {streamdown-0.14.0 → streamdown-0.16.0}/tests/fizzbuzz.md +0 -0
  40. {streamdown-0.14.0 → streamdown-0.16.0}/tests/inline.md +0 -0
  41. {streamdown-0.14.0 → streamdown-0.16.0}/tests/line-buffer.sh +0 -0
  42. {streamdown-0.14.0 → streamdown-0.16.0}/tests/line-wrap.md +0 -0
  43. {streamdown-0.14.0 → streamdown-0.16.0}/tests/line.md +0 -0
  44. {streamdown-0.14.0 → streamdown-0.16.0}/tests/links.md +0 -0
  45. {streamdown-0.14.0 → streamdown-0.16.0}/tests/longer-example.md +0 -0
  46. {streamdown-0.14.0 → streamdown-0.16.0}/tests/mandlebrot.md +0 -0
  47. {streamdown-0.14.0 → streamdown-0.16.0}/tests/markdown.md +0 -0
  48. {streamdown-0.14.0 → streamdown-0.16.0}/tests/nested-example.md +0 -0
  49. {streamdown-0.14.0 → streamdown-0.16.0}/tests/new.md +0 -0
  50. {streamdown-0.14.0 → streamdown-0.16.0}/tests/outline.md +0 -0
  51. {streamdown-0.14.0 → streamdown-0.16.0}/tests/sd.log +0 -0
  52. {streamdown-0.14.0 → streamdown-0.16.0}/tests/table-break.md +0 -0
  53. {streamdown-0.14.0 → streamdown-0.16.0}/tests/table.md +0 -0
  54. {streamdown-0.14.0 → streamdown-0.16.0}/tests/table_test.md +0 -0
  55. {streamdown-0.14.0 → streamdown-0.16.0}/tests/test.md +0 -0
  56. {streamdown-0.14.0 → streamdown-0.16.0}/tests/test_input.md +0 -0
  57. {streamdown-0.14.0 → streamdown-0.16.0}/tests/white-space-code.md +0 -0
  58. {streamdown-0.14.0 → streamdown-0.16.0}/tests/wm.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamdown
3
- Version: 0.14.0
3
+ Version: 0.16.0
4
4
  Summary: A streaming markdown renderer for modern terminals with syntax highlighting
5
5
  Project-URL: Homepage, https://github.com/kristopolous/Streamdown
6
6
  Project-URL: Bug Tracker, https://github.com/kristopolous/Streamdown/issues
@@ -23,47 +23,49 @@ Requires-Python: >=3.8
23
23
  Requires-Dist: appdirs
24
24
  Requires-Dist: pygments
25
25
  Requires-Dist: pylatexenc
26
+ Requires-Dist: term-image
26
27
  Requires-Dist: toml
27
28
  Description-Content-Type: text/markdown
28
29
 
29
- # Streamdown
30
+ <p align="center">
31
+ <img src=https://github.com/user-attachments/assets/0468eac0-2a00-4e98-82ca-09e6ac679357/>
32
+ <br/>
33
+ <a href=https://pypi.org/project/streamdown><img src=https://badge.fury.io/py/streamdown.svg/></a>
34
+ </p>
30
35
 
31
- [![PyPI version](https://badge.fury.io/py/streamdown.svg)](https://badge.fury.io/py/streamdown)
32
-
33
- I needed a streaming Markdown renderer and I couldn't find one. So here we go. From the ground up. It's a bad idea but it has to be done.
34
-
35
- [sd demo](https://github.com/user-attachments/assets/48dba6fa-2282-4be9-8087-a2ad8e7c7d12)
36
-
37
- This will work with [simonw's llm](https://github.com/simonw/llm) unlike with [richify.py](https://github.com/gianlucatruda/richify) which rerenders the whole buffer and blocks with an elipses or [glow](https://github.com/charmbracelet/glow) which buffers everything, this streams and does exactly what it says.
38
-
39
- ## Some Features
36
+ The streaming markdown renderer for the terminal that rocks!
37
+ Streamdown works with [simonw's llm](https://github.com/simonw/llm) along with any other streaming markdown. You even get full readline and keyboard navigation support.
38
+ ```bash
39
+ $ pip install streamdown
40
+ ```
41
+ ![Streamdown is Amazing](https://github.com/user-attachments/assets/268cb340-78cc-4df0-a773-c5ac95eceeeb)
40
42
 
41
- ### Provides clean copyable code for long code blocks and short terminals.
42
- ![copyable](https://github.com/user-attachments/assets/4a3539c5-b5d1-4d6a-8bce-032724d8909d)
43
+ ### Provides clean copyable code for long code lines
44
+ You may have noticed *inferior* renderers inject line breaks when copying code that wraps around. We're better and now you are too!
45
+ ![Handle That Mandle](https://github.com/user-attachments/assets/a27aa70c-f691-4796-84f0-c2eb18c7de23)
43
46
 
44
- ### Supports images, why not?
47
+ ### Supports images
45
48
  Here's kitty and alacritty. Try to do that in glow...
46
- ![doggie](https://github.com/user-attachments/assets/9a392929-b6c2-4204-b257-e09305acb7af)
49
+ ![doggie](https://github.com/user-attachments/assets/81c43983-68cd-40c1-b1d5-aa3a52004504)
47
50
 
48
- ### Does OSC 8 links for modern terminals (and optionally OSC 52 for clipboard)
51
+ ### Supports hyperlinks (OSC 8) and clipboard (OSC 52)
49
52
  [links.webm](https://github.com/user-attachments/assets/a5f71791-7c58-4183-ad3b-309f470c08a3)
50
53
 
51
- ### Doesn't consume characters like _ and * as style when they are in `blocks like this` because `_they_can_be_varaiables_`
52
- ![dunder](https://github.com/user-attachments/assets/d41d7fec-6dec-4387-b53d-f2098f269a5e)
53
-
54
- ### Tables are carefully supported
54
+ ### Supports tables
55
55
  ![table](https://github.com/user-attachments/assets/dbe3d13e-6bac-4f45-bf30-f1857ed98898)
56
56
 
57
+ As well as everything else...
58
+ ![dunder](https://github.com/user-attachments/assets/d41d7fec-6dec-4387-b53d-f2098f269a5e)
59
+
57
60
  ### Colors are highly (and quickly) configurable for people who care a lot, or just a little.
58
- ![configurable](https://github.com/user-attachments/assets/04b36749-4bb8-4c14-9758-84eb6e19b704)
61
+ ![configurable](https://github.com/user-attachments/assets/19ca2ec9-8ea1-4a79-87ca-8352789269fe)
59
62
 
60
63
  ### Has a [Plugin](https://github.com/kristopolous/Streamdown/tree/main/streamdown/plugins) system to extend the parser and renderer.
61
64
  For instance, here is the [latex plugin](https://github.com/kristopolous/Streamdown/blob/main/streamdown/plugins/latex.py) doing math inside a table:
62
65
  ![calc](https://github.com/user-attachments/assets/0b0027ca-8ef0-4b4a-b4ae-e36ff623a683)
63
66
 
64
67
 
65
- ## Configuration
66
-
68
+ ## TOML Configuration
67
69
 
68
70
  Streamdown uses a TOML configuration file located at `~/.config/streamdown/config.toml` (following the XDG Base Directory Specification). If this file does not exist upon first run, it will be created with default values.
69
71
 
@@ -84,7 +86,7 @@ Defines the base Hue (H), Saturation (S), and Value (V) from which all other pal
84
86
  * `Width` (integer, default: `0`): Along with the `Margin`, `Width` specifies the base width of the content, which when set to 0, means use the terminal width. See [#6](https://github.com/kristopolous/Streamdown/issues/6) for more details
85
87
  * `PrettyPad` (boolean, default: `false`): Uses a unicode vertical pad trick to add a half height background to code blocks. This makes copy/paste have artifacts. See [#2](https://github.com/kristopolous/Streamdown/issues/2). I like it on. But that's just me
86
88
  * `ListIndent` (integer, default: `2`): This is the recursive indent for the list styles.
87
- * `Syntax` (string, default `monokai`): This the syntax [highlighting theme which come via pygments](https://pygments.org/styles/).
89
+ * `Syntax` (string, default `monokai`): This is the syntax [highlighting theme which come via pygments](https://pygments.org/styles/).
88
90
 
89
91
  Example:
90
92
  ```toml
@@ -113,7 +115,7 @@ Width = 120
113
115
  Timeout = 1.0
114
116
  ```
115
117
 
116
- ## Invocation
118
+ ## Command Line
117
119
  The most exciting feature here is `--exec` with it you can do full readline support like this:
118
120
 
119
121
  $ sd --exec "llm chat"
@@ -143,10 +145,8 @@ Do this
143
145
 
144
146
  $ ./streamdown/sd.py tests/*md
145
147
 
146
- Certainly room for improvement and I'll probably continue to make them
147
-
148
148
  ## Install from source
149
- At least one of these should work, hopefully
149
+ After the git clone least one of these should work, hopefully. it's using the modern uv pip tool.
150
150
 
151
151
  $ pipx install -e .
152
152
  $ pip install -e .
@@ -1,41 +1,42 @@
1
- # Streamdown
2
-
3
- [![PyPI version](https://badge.fury.io/py/streamdown.svg)](https://badge.fury.io/py/streamdown)
4
-
5
- I needed a streaming Markdown renderer and I couldn't find one. So here we go. From the ground up. It's a bad idea but it has to be done.
6
-
7
- [sd demo](https://github.com/user-attachments/assets/48dba6fa-2282-4be9-8087-a2ad8e7c7d12)
8
-
9
- This will work with [simonw's llm](https://github.com/simonw/llm) unlike with [richify.py](https://github.com/gianlucatruda/richify) which rerenders the whole buffer and blocks with an elipses or [glow](https://github.com/charmbracelet/glow) which buffers everything, this streams and does exactly what it says.
10
-
11
- ## Some Features
1
+ <p align="center">
2
+ <img src=https://github.com/user-attachments/assets/0468eac0-2a00-4e98-82ca-09e6ac679357/>
3
+ <br/>
4
+ <a href=https://pypi.org/project/streamdown><img src=https://badge.fury.io/py/streamdown.svg/></a>
5
+ </p>
6
+
7
+ The streaming markdown renderer for the terminal that rocks!
8
+ Streamdown works with [simonw's llm](https://github.com/simonw/llm) along with any other streaming markdown. You even get full readline and keyboard navigation support.
9
+ ```bash
10
+ $ pip install streamdown
11
+ ```
12
+ ![Streamdown is Amazing](https://github.com/user-attachments/assets/268cb340-78cc-4df0-a773-c5ac95eceeeb)
12
13
 
13
- ### Provides clean copyable code for long code blocks and short terminals.
14
- ![copyable](https://github.com/user-attachments/assets/4a3539c5-b5d1-4d6a-8bce-032724d8909d)
14
+ ### Provides clean copyable code for long code lines
15
+ You may have noticed *inferior* renderers inject line breaks when copying code that wraps around. We're better and now you are too!
16
+ ![Handle That Mandle](https://github.com/user-attachments/assets/a27aa70c-f691-4796-84f0-c2eb18c7de23)
15
17
 
16
- ### Supports images, why not?
18
+ ### Supports images
17
19
  Here's kitty and alacritty. Try to do that in glow...
18
- ![doggie](https://github.com/user-attachments/assets/9a392929-b6c2-4204-b257-e09305acb7af)
20
+ ![doggie](https://github.com/user-attachments/assets/81c43983-68cd-40c1-b1d5-aa3a52004504)
19
21
 
20
- ### Does OSC 8 links for modern terminals (and optionally OSC 52 for clipboard)
22
+ ### Supports hyperlinks (OSC 8) and clipboard (OSC 52)
21
23
  [links.webm](https://github.com/user-attachments/assets/a5f71791-7c58-4183-ad3b-309f470c08a3)
22
24
 
23
- ### Doesn't consume characters like _ and * as style when they are in `blocks like this` because `_they_can_be_varaiables_`
24
- ![dunder](https://github.com/user-attachments/assets/d41d7fec-6dec-4387-b53d-f2098f269a5e)
25
-
26
- ### Tables are carefully supported
25
+ ### Supports tables
27
26
  ![table](https://github.com/user-attachments/assets/dbe3d13e-6bac-4f45-bf30-f1857ed98898)
28
27
 
28
+ As well as everything else...
29
+ ![dunder](https://github.com/user-attachments/assets/d41d7fec-6dec-4387-b53d-f2098f269a5e)
30
+
29
31
  ### Colors are highly (and quickly) configurable for people who care a lot, or just a little.
30
- ![configurable](https://github.com/user-attachments/assets/04b36749-4bb8-4c14-9758-84eb6e19b704)
32
+ ![configurable](https://github.com/user-attachments/assets/19ca2ec9-8ea1-4a79-87ca-8352789269fe)
31
33
 
32
34
  ### Has a [Plugin](https://github.com/kristopolous/Streamdown/tree/main/streamdown/plugins) system to extend the parser and renderer.
33
35
  For instance, here is the [latex plugin](https://github.com/kristopolous/Streamdown/blob/main/streamdown/plugins/latex.py) doing math inside a table:
34
36
  ![calc](https://github.com/user-attachments/assets/0b0027ca-8ef0-4b4a-b4ae-e36ff623a683)
35
37
 
36
38
 
37
- ## Configuration
38
-
39
+ ## TOML Configuration
39
40
 
40
41
  Streamdown uses a TOML configuration file located at `~/.config/streamdown/config.toml` (following the XDG Base Directory Specification). If this file does not exist upon first run, it will be created with default values.
41
42
 
@@ -56,7 +57,7 @@ Defines the base Hue (H), Saturation (S), and Value (V) from which all other pal
56
57
  * `Width` (integer, default: `0`): Along with the `Margin`, `Width` specifies the base width of the content, which when set to 0, means use the terminal width. See [#6](https://github.com/kristopolous/Streamdown/issues/6) for more details
57
58
  * `PrettyPad` (boolean, default: `false`): Uses a unicode vertical pad trick to add a half height background to code blocks. This makes copy/paste have artifacts. See [#2](https://github.com/kristopolous/Streamdown/issues/2). I like it on. But that's just me
58
59
  * `ListIndent` (integer, default: `2`): This is the recursive indent for the list styles.
59
- * `Syntax` (string, default `monokai`): This the syntax [highlighting theme which come via pygments](https://pygments.org/styles/).
60
+ * `Syntax` (string, default `monokai`): This is the syntax [highlighting theme which come via pygments](https://pygments.org/styles/).
60
61
 
61
62
  Example:
62
63
  ```toml
@@ -85,7 +86,7 @@ Width = 120
85
86
  Timeout = 1.0
86
87
  ```
87
88
 
88
- ## Invocation
89
+ ## Command Line
89
90
  The most exciting feature here is `--exec` with it you can do full readline support like this:
90
91
 
91
92
  $ sd --exec "llm chat"
@@ -115,10 +116,8 @@ Do this
115
116
 
116
117
  $ ./streamdown/sd.py tests/*md
117
118
 
118
- Certainly room for improvement and I'll probably continue to make them
119
-
120
119
  ## Install from source
121
- At least one of these should work, hopefully
120
+ After the git clone least one of these should work, hopefully. it's using the modern uv pip tool.
122
121
 
123
122
  $ pipx install -e .
124
123
  $ pip install -e .
Binary file
@@ -0,0 +1,116 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Generator: visioncortex VTracer -->
3
+
4
+ <svg
5
+ id="svg"
6
+ version="1.1"
7
+ style="display:block"
8
+ viewBox="0 0 389.90754 91.487504"
9
+ sodipodi:docname="logo.svg"
10
+ width="389.90753"
11
+ height="91.487503"
12
+ inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
13
+ inkscape:export-filename="logo.png"
14
+ inkscape:export-xdpi="96"
15
+ inkscape:export-ydpi="96"
16
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
17
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ xmlns:svg="http://www.w3.org/2000/svg">
20
+ <defs
21
+ id="defs14" />
22
+ <sodipodi:namedview
23
+ id="namedview14"
24
+ pagecolor="#ffffff"
25
+ bordercolor="#000000"
26
+ borderopacity="0.25"
27
+ inkscape:showpageshadow="2"
28
+ inkscape:pageopacity="0.0"
29
+ inkscape:pagecheckerboard="0"
30
+ inkscape:deskcolor="#d1d1d1"
31
+ inkscape:zoom="7.6562156"
32
+ inkscape:cx="84.702421"
33
+ inkscape:cy="45.126733"
34
+ inkscape:window-width="1239"
35
+ inkscape:window-height="1080"
36
+ inkscape:window-x="515"
37
+ inkscape:window-y="-2"
38
+ inkscape:window-maximized="0"
39
+ inkscape:current-layer="svg" />
40
+ <path
41
+ d="m 53.95,0 h 3.9 l 2.925,0.65 2.4375,0.8125 2.6,1.1375 2.6,1.4625 2.1125,1.4625 1.95,1.4625 1.625,1.4625 1.95,1.7875 1.1375,1.1375 1.1375,1.3 2.1125,2.6 1.3,1.7875 1.625,2.1125 0.975,1.3 1.3,0.65 2.6,0.975 5.2,2.6 2.925,1.7875 2.7625,1.95 2.1125,1.7875 1.7875,1.4625 2.925,2.925 1.4625,1.7875 1.3,1.4625 1.95,2.7625 1.7875,2.925 1.95,3.7375 2.1125,5.3625 1.1375,4.0625 0.975,3.4125 1.4625,2.4375 0.8125,1.625 0.325,1.1375 0.1625,2.1125 -0.65,2.6 -1.4625,2.6 -1.4625,1.7875 -1.7875,1.7875 -2.7625,2.1125 -2.1125,1.3 -3.4125,1.95 -2.6,1.3 -3.4125,1.4625 -3.4125,1.1375 -4.55,0.975 -4.225,0.65 -5.0375,0.325 -4.225,-0.1625 -2.7625,-0.325 -2.4375,1.4625 -2.6,1.4625 -2.7625,0.975 -2.925,0.65 H 62.075 L 60.125,91 57.85,89.8625 56.7125,88.725 55.9,87.1 l -0.4875,-2.4375 -3.0875,-0.975 -1.7875,-0.975 -1.625,-1.3 L 47.45,79.3 46.8,77.5125 46.475,75.4 v -2.925 l -1.4625,-1.7875 -1.95,-2.275 -1.3,-1.625 -1.95,-2.275 -1.4625,-1.625 -1.1375,-1.3 L 35.75,59.9625 34.2875,58.3375 32.825,56.55 32.0125,55.7375 v -0.325 h -0.325 l -1.1375,-1.3 -1.3,-0.65 -1.625,0.1625 -1.95,0.8125 -2.275,1.3 -3.7375,1.7875 -3.25,1.4625 -3.575,1.3 -3.0875,0.65 H 6.175 L 4.0625,60.45 3.0875,59.9625 2.1125,58.825 1.4625,57.0375 V 54.925 L 1.95,52.4875 3.25,48.5875 4.875,44.85 6.6625,41.4375 7.8,39.325 l -0.1625,-1.3 -1.3,-2.6 -2.275,-4.55 -1.95,-4.55 L 0.975,22.9125 0.325,20.15 0,17.7125 V 14.625 l 0.65,-1.7875 1.1375,-1.4625 0.975,-0.65 0.8125,-0.1625 h 1.7875 l 2.7625,0.65 2.6,1.1375 2.6,1.4625 2.6,1.7875 2.1125,1.625 2.1125,1.7875 2.4375,2.275 1.95,1.95 1.1375,1.3 2.1125,2.275 1.7875,2.275 c 0.275719,0.499267 0.393174,0.632565 0.65,0.975 l 0.65,0.325 1.1375,0.8125 0.975,0.1625 2.6,-1.1375 2.7625,-1.625 2.6,-1.4625 0.975,-0.4875 v -1.625 l 0.325,-1.95 0.65,-1.3 1.1375,-1.1375 1.7875,-1.1375 1.7875,-1.3 0.325,-0.4875 V 16.25 L 47.125,12.1875 46.9625,10.725 V 7.15 L 47.45,4.7125 48.5875,2.7625 49.725,1.625 52,0.4875 Z"
42
+ style="fill:#fbb034;stroke-width:0.1625"
43
+ id="path1"
44
+ sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
45
+ <path
46
+ d="m 4.0625,13.8125 h 1.3 l 2.1125,0.65 2.7625,1.3 3.9,2.6 1.625,1.3 2.275,1.7875 0.8125,0.8125 4.55,4.55 1.1375,1.3 2.1125,2.4375 1.7875,2.275 0.65,0.8125 1.4625,0.975 0.4875,0.1625 h 2.4375 l 2.6,-1.1375 1.7875,-0.975 3.9,-2.275 4.225,-2.275 L 49.725,26.325 52,25.5125 56.0625,24.375 60.45,23.4 66.1375,22.75 68.575,22.5875 h 6.0125 l 3.4125,0.325 5.0375,0.975 1.7875,0.4875 0.1625,0.65 -2.1125,0.8125 -2.6,1.3 -2.925,2.1125 -2.4375,2.275 -1.1375,1.4625 -1.625,2.1125 -1.625,2.7625 -1.3,2.7625 -0.8125,3.4125 -0.1625,5.3625 -0.325,2.4375 -0.8125,2.6 -1.4625,3.0875 -0.325,1.7875 0.1625,1.95 0.325,1.625 0.325,0.1625 h -0.325 l 0.1625,0.4875 -2.6,-0.65 -1.7875,-0.325 h -4.225 l -2.6,0.4875 -2.1125,0.8125 h -0.325 v 0.325 l -1.4625,0.975 -0.65,0.325 v 0.325 L 49.4,66.625 47.775,68.9 47.45,68.7375 v -0.325 l -0.65,-0.325 -2.1125,-1.95 -1.95,-1.95 L 41.275,62.4 39.65,60.2875 37.8625,58.0125 36.075,55.7375 33.9625,53.1375 32.825,52.1625 32.0125,51.35 30.225,50.2125 29.7375,50.05 h -1.95 l -1.4625,0.325 -2.6,1.4625 -1.625,0.975 -3.4125,1.7875 -3.25,1.3 -3.4125,1.1375 -3.9,0.65 -2.6,-0.1625 -0.65,-0.65 v -1.95 L 5.525,52 l 1.1375,-3.25 0.65,-1.4625 1.3,-2.6 1.95,-3.25 0.65,-1.4625 v -2.1125 l -0.65,-1.625 L 8.775,32.825 7.15,29.7375 6.0125,27.3 4.3875,22.75 3.7375,20.6375 3.4125,18.85 3.25,15.7625 3.575,14.3 Z"
47
+ style="fill:#faaa36;stroke-width:0.1625"
48
+ id="path2" />
49
+ <path
50
+ d="m 53.95,0 h 3.9 l 2.925,0.65 2.4375,0.8125 2.6,1.1375 2.6,1.4625 2.1125,1.4625 1.95,1.4625 1.625,1.4625 1.95,1.7875 1.1375,1.1375 1.1375,1.3 2.1125,2.6 1.3,1.7875 1.625,2.1125 0.975,1.3 1.3,0.65 2.6,0.975 5.2,2.6 2.925,1.7875 2.7625,1.95 2.1125,1.7875 1.7875,1.4625 2.925,2.925 1.4625,1.7875 1.3,1.4625 1.95,2.7625 1.7875,2.925 1.95,3.7375 2.1125,5.3625 1.1375,4.0625 0.975,3.4125 1.4625,2.4375 0.8125,1.625 0.325,1.1375 0.1625,2.1125 -0.65,2.6 -1.4625,2.6 -1.4625,1.7875 -1.7875,1.7875 -2.7625,2.1125 -2.1125,1.3 -3.4125,1.95 -2.6,1.3 -3.4125,1.4625 -3.4125,1.1375 -4.55,0.975 -4.225,0.65 -5.0375,0.325 -4.225,-0.1625 -2.7625,-0.325 -2.4375,1.4625 -2.6,1.4625 -2.7625,0.975 -2.925,0.65 H 62.075 L 60.125,91 57.85,89.8625 56.7125,88.725 55.9,87.1 l -0.4875,-2.4375 -3.0875,-0.975 -1.7875,-0.975 -1.625,-1.3 L 47.45,79.3 46.8,77.5125 46.475,75.4 v -2.925 l -1.4625,-1.7875 -1.95,-2.275 -1.3,-1.625 -1.95,-2.275 -1.4625,-1.625 -1.1375,-1.3 L 35.75,59.9625 34.2875,58.3375 32.825,56.55 32.0125,55.7375 v -0.325 h -0.325 l -1.1375,-1.3 -1.3,-0.65 -1.625,0.1625 -1.95,0.8125 -2.275,1.3 -3.7375,1.7875 -3.25,1.4625 -3.575,1.3 -3.0875,0.65 H 6.175 L 4.0625,60.45 3.0875,59.9625 2.1125,58.825 1.4625,57.0375 V 54.925 L 1.95,52.4875 3.25,48.5875 4.875,44.85 6.6625,41.4375 7.8,39.325 l -0.1625,-1.3 -1.3,-2.6 -2.275,-4.55 -1.95,-4.55 L 0.975,22.9125 0.325,20.15 0,17.7125 V 14.625 l 0.65,-1.7875 1.1375,-1.4625 0.975,-0.65 0.8125,-0.1625 h 1.7875 l 2.7625,0.65 2.6,1.1375 2.6,1.4625 2.6,1.7875 2.1125,1.625 2.1125,1.7875 2.4375,2.275 1.95,1.95 1.1375,1.3 2.1125,2.275 1.7875,2.275 0.325,0.65 c 0.351718,0.267784 0.216666,0.216666 0.325,0.325 l 0.65,0.325 1.1375,0.8125 0.975,0.1625 2.6,-1.1375 2.7625,-1.625 2.6,-1.4625 0.975,-0.4875 v -1.625 l 0.325,-1.95 0.65,-1.3 1.1375,-1.1375 1.7875,-1.1375 1.7875,-1.3 0.325,-0.4875 V 16.25 L 47.125,12.1875 46.9625,10.725 V 7.15 L 47.45,4.7125 48.5875,2.7625 49.725,1.625 52,0.4875 Z M 4.0625,13.8125 3.575,14.3 3.25,16.25 l 0.1625,2.6 0.4875,2.275 1.7875,5.3625 1.3,2.925 1.625,3.25 1.625,2.925 0.8125,1.625 0.1625,0.65 v 2.1125 l -1.3,2.6 L 8.45,45.0125 6.9875,47.775 5.3625,52.4875 4.875,54.925 v 1.95 l 0.65,0.65 2.6,0.1625 3.9,-0.65 4.7125,-1.625 3.25,-1.4625 3.575,-1.95 1.7875,-1.1375 1.3,-0.65 1.1375,-0.1625 h 1.95 l 1.625,0.8125 1.3,0.975 0.8125,0.8125 1.625,1.7875 2.1125,2.7625 2.1125,2.6 1.95,2.6 2.1125,2.4375 2.6,2.6 1.1375,0.975 c 0.238154,0.3062 0.308617,0.308617 0.4875,0.4875 l 0.8125,-0.8125 1.4625,-2.1125 0.325,-0.1625 c -0.0044,-0.457005 0.238774,-0.444387 0.65,-0.65 l 1.4625,-0.975 1.4625,-0.8125 1.625,-0.4875 1.95,-0.325 h 4.225 l 3.0875,0.65 2.275,0.8125 0.975,0.4875 0.4875,0.1625 v 1.1375 l -0.4875,0.65 -1.4625,-0.1625 -3.575,-0.8125 h -4.225 l -2.7625,0.65 -1.95,0.8125 -1.4625,1.1375 -1.3,1.625 -0.975,1.95 -0.325,1.4625 v 2.7625 l 0.4875,1.7875 0.65,1.1375 1.625,1.4625 1.7875,0.8125 L 57.2,81.575 61.5875,81.25 64.35,80.6 66.3,79.7875 68.0875,78.65 l 1.625,-1.4625 1.95,-1.95 0.65,-0.8125 0.65,0.325 h 0.975 l 0.1625,0.975 -1.3,1.7875 -1.625,2.275 -1.625,1.625 v 0.325 l 2.1125,0.8125 3.4125,0.975 2.6,0.4875 4.55,0.325 h 4.225 l 5.525,-0.65 3.7375,-0.8125 4.3875,-1.4625 3.9,-1.625 3.0875,-1.4625 0.975,-0.65 -0.65,-0.325 L 105.3,76.7 104,75.8875 h -0.325 l -0.325,-0.65 -0.975,-1.3 -0.1625,-0.8125 0.8125,-0.1625 1.625,1.1375 1.4625,0.65 0.65,0.1625 h 2.925 l 1.95,-0.4875 2.275,-1.1375 1.625,-1.3 1.3,-1.4625 1.1375,-2.275 0.1625,-0.65 v -2.275 l -0.325,-0.975 -1.3,-1.95 -0.975,-1.625 -0.65,-1.7875 -0.8125,-3.9 -1.3,-3.9 -1.625,-3.9 L 110.175,45.5 109.2,43.875 108.55,42.7375 106.4375,39.65 104.65,37.5375 104,36.5625 103.5125,36.075 c -0.32419,-0.296348 -0.34673,-0.309086 -0.65,-0.65 l -0.65,-0.8125 -0.8125,-0.65 -0.1625,-0.325 c -0.30502,-0.235862 -0.21667,-0.216666 -0.325,-0.325 l -1.625,-1.3 C 99.166039,31.822798 98.921706,31.646706 98.8,31.525 98.439053,31.259572 98.321876,31.176382 98.15,31.0375 L 96.3625,29.9 l -2.6,-1.625 -2.6,-1.4625 L 87.75,25.35 83.6875,24.05 79.625,23.2375 76.5375,22.75 74.5875,22.5875 H 68.575 l -5.6875,0.4875 -4.0625,0.65 -5.2,1.3 -3.0875,0.975 -3.25,1.4625 -4.7125,2.4375 -3.9,2.275 -2.6,1.4625 -2.6,1.1375 h -2.4375 l -1.3,-0.65 L 28.925,33.3125 27.625,31.85 26.1625,30.0625 24.375,27.95 22.9125,26.325 18.85,22.2625 18.0375,21.45 15.4375,19.3375 13,17.55 9.9125,15.6 7.475,14.4625 5.3625,13.8125 Z"
51
+ style="fill:#253949;stroke-width:0.1625;fill-opacity:1"
52
+ id="path3"
53
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
54
+ <path
55
+ d="m 4.0625,13.8125 h 1.3 l 2.1125,0.65 2.7625,1.3 3.9,2.6 1.625,1.3 2.275,1.7875 0.8125,0.8125 4.55,4.55 1.1375,1.3 2.1125,2.4375 1.7875,2.275 0.4875,0.4875 -0.1625,0.4875 -0.4875,0.325 v 0.325 l -0.8125,0.65 v 0.4875 L 26.975,36.075 26.65,36.725 H 26.325 L 26,37.5375 l -0.325,0.65 V 39 l -0.65,0.8125 0.325,0.1625 -0.325,0.325 -0.325,3.25 0.1625,2.4375 0.325,0.8125 0.65,2.6 0.1625,1.1375 -2.7625,1.625 -3.575,1.95 -3.7375,1.625 -3.9,1.3 -3.9,0.65 -2.6,-0.1625 -0.65,-0.65 v -1.95 L 5.525,52 l 1.1375,-3.25 0.65,-1.4625 1.3,-2.6 1.95,-3.25 0.65,-1.4625 v -2.1125 l -0.65,-1.625 L 8.775,32.825 7.15,29.7375 6.0125,27.3 4.3875,22.75 3.7375,20.6375 3.4125,18.85 3.25,15.7625 3.575,14.3 Z"
56
+ style="fill:#faa428;stroke-width:0.1625"
57
+ id="path4" />
58
+ <path
59
+ d="m 90.675,45.9875 h 2.1125 l 2.6,0.65 1.625,0.65 2.1125,1.4625 0.4875,0.4875 c 0.208101,0.306981 0.238774,0.444387 0.65,0.65 L 101.725,52 l 0.8125,1.7875 0.65,2.6 v 3.575 l -0.65,2.4375 -1.1375,2.275 -0.975,1.3 -0.975,1.1375 -2.1125,1.4625 -2.275,0.975 -1.3,0.325 h -2.925 L 88.4,69.225 86.125,68.0875 84.6625,66.95 83.2,65.4875 81.9,63.375 81.0875,61.5875 80.6,59.475 v -3.7375 l 0.65,-2.4375 1.1375,-2.275 1.4625,-1.7875 1.4625,-1.3 2.4375,-1.3 z"
60
+ style="fill:#263d50;stroke-width:0.1625"
61
+ id="path5"
62
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccc" />
63
+ <path
64
+ d="m 72.6375,22.5875 h 1.95 l 3.4125,0.325 5.0375,0.975 1.7875,0.4875 0.1625,0.65 -2.1125,0.8125 -2.6,1.3 -2.925,2.1125 -2.4375,2.275 -1.1375,1.4625 -1.625,2.1125 -1.625,2.7625 -1.3,2.7625 -0.8125,3.4125 -0.1625,5.3625 -0.325,2.4375 -0.8125,2.6 -1.4625,3.0875 -0.325,1.7875 0.1625,1.95 0.325,1.625 0.325,0.1625 h -0.325 l 0.1625,0.4875 -2.6,-0.65 -1.7875,-0.325 h -4.225 l -1.3,0.1625 L 55.9,62.4 l 0.65,-0.1625 -0.1625,-0.65 h 0.325 l -0.325,-1.4625 v -3.9 l 0.4875,-1.625 1.3,-2.7625 0.8125,-1.95 0.975,-2.925 0.1625,-0.975 0.1625,-4.7125 0.325,-2.4375 L 61.425,36.725 62.4,34.775 63.5375,33.3125 65,31.525 l 1.95,-1.95 1.3,-1.1375 1.1375,-1.1375 1.4625,-1.7875 1.4625,-2.275 z"
65
+ style="fill:#f27b3f;stroke-width:0.1625"
66
+ id="path6" />
67
+ <path
68
+ d="M 54.925,3.0875 H 57.2 l 2.6,0.4875 3.0875,1.1375 1.3,0.65 1.3,0.4875 1.7875,1.1375 2.275,1.625 2.1125,1.625 2.7625,2.6 0.975,1.1375 0.8125,0.8125 c 0.216312,0.279081 0.216666,0.216667 0.325,0.325 l 1.1375,1.7875 1.4625,1.95 0.325,0.975 -0.65,0.1625 -3.0875,-0.325 H 68.25 l -4.875,0.4875 -4.3875,0.65 -5.85,1.4625 -3.575,1.3 -3.7375,1.625 h -0.65 v -0.975 l 0.8125,-0.975 2.6,-1.4625 1.625,-1.3 0.975,-1.4625 0.1625,-0.65 v -1.95 l -0.975,-4.55 -0.1625,-1.625 V 6.5 l 0.65,-1.4625 1.3,-0.975 1.3,-0.65 z"
69
+ style="fill:#fcb031;stroke-width:0.1625"
70
+ id="path7"
71
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccc" />
72
+ <path
73
+ d="m 68.575,22.5875 h 4.0625 l -0.325,0.975 -1.7875,2.6 -2.4375,2.6 -2.6,2.4375 -1.4625,1.625 -1.4625,1.95 -1.3,2.6 -0.65,2.275 -0.1625,2.1125 -0.1625,4.225 -0.65,2.6 -1.1375,3.0875 -1.3,2.6 -0.4875,1.1375 -0.1625,0.8125 v 3.9 l 0.1625,1.4625 h -0.325 l 0.325,0.8125 -1.3,0.4875 -2.4375,0.8125 -0.65,0.1625 v 0.325 L 51.35,64.5125 51.1875,63.375 50.7,63.2125 50.5375,62.725 50.2125,62.5625 50.375,61.75 49.5625,61.9125 v -0.325 L 49.075,61.425 49.725,61.2625 49.8875,61.1 49.4,60.775 l -0.1625,-0.1625 -0.325,0.325 -0.325,-0.65 -0.1625,-0.8125 -0.1625,-1.4625 0.325,-2.6 0.325,-1.4625 0.8125,-1.7875 0.975,-2.6 0.8125,-1.7875 0.325,-1.3 V 44.2 l -0.325,-2.4375 v -2.275 L 52,37.05 l 1.1375,-2.4375 1.1375,-1.95 0.975,-1.1375 1.4625,-1.7875 2.1125,-2.1125 0.8125,-0.975 h 0.325 l 0.325,-0.8125 0.975,-1.4625 0.1625,-0.975 1.4625,-0.325 z"
74
+ style="fill:#faaf38;stroke-width:0.1625"
75
+ id="path8" />
76
+ <path
77
+ d="m 60.45,23.4 h 0.975 l 0.1625,0.65 -0.975,1.625 -0.65,0.975 -0.65,0.65 -0.65,0.65 -1.95,1.95 -0.975,1.3 -0.65,0.8125 -0.975,1.1375 -0.975,1.625 -0.975,2.275 -0.4875,2.4375 v 2.275 L 52,44.2 v 2.275 l -0.4875,1.625 -1.1375,2.6 -0.975,2.6 -0.4875,0.975 -0.1625,1.1375 -0.325,2.6 v 1.4625 l 0.325,0.1625 -0.1625,0.65 0.325,0.1625 0.1625,0.1625 0.4875,0.975 v 0.325 l 0.65,0.65 0.4875,0.1625 0.1625,0.4875 0.325,0.1625 0.325,0.8125 -0.1625,0.65 -0.8125,0.65 h -0.325 v 0.325 L 49.4,66.625 47.775,68.9 47.45,68.7375 v -0.325 l -0.65,-0.325 -2.1125,-1.95 -1.95,-1.95 -1.4625,-1.7875 -0.1625,-0.325 1.3,0.1625 0.1625,-0.65 -0.325,-0.65 -0.4875,-0.65 L 41.275,58.6625 40.625,57.2 40.3,54.6 40.95,52 l 1.1375,-2.275 1.625,-2.6 0.65,-1.7875 0.1625,-0.975 V 42.575 l -0.4875,-3.7375 0.1625,-2.925 0.65,-2.4375 0.4875,-0.8125 0.975,-1.625 1.3,-1.625 L 49.4,27.3 49.5625,26.975 h 0.325 V 26.65 l 0.975,-0.8125 5.2,-1.4625 z"
78
+ style="fill:#f07640;stroke-width:0.1625"
79
+ id="path9"
80
+ sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
81
+ <path
82
+ d="m 38.35,32.3375 0.325,0.1625 -0.325,3.25 -0.325,5.6875 -0.4875,3.0875 -0.8125,1.95 -1.7875,3.0875 V 50.05 l -0.8125,0.8125 -0.65,1.3 -0.325,0.1625 -1.7875,-1.4625 -1.625,-0.8125 h -1.95 L 26,50.375 25.5125,49.075 24.8625,46.15 24.7,45.5 24.5375,43.0625 24.8625,40.3 l 0.325,-0.975 0.325,-0.65 0.1625,-0.65 0.65,-1.3 0.65,-0.975 c 0.137171,-0.150279 0.216667,-0.433333 0.325,-0.65 l 0.65,-0.65 c 0.148224,-0.179928 0.08941,-0.268234 0.1625,-0.4875 l 0.975,-0.325 1.4625,0.975 0.4875,0.1625 h 2.4375 l 2.6,-1.1375 1.7875,-0.975 z"
83
+ style="fill:#f17840;stroke-width:0.1625"
84
+ id="path10"
85
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccc" />
86
+ <path
87
+ d="m 91,47.775 h 1.625 l 2.1125,0.4875 2.275,1.1375 1.95,1.7875 1.4625,2.275 0.65,1.7875 0.325,1.95 -0.1625,2.925 -0.8125,2.6 -0.1625,0.325 h -0.325 L 100.1,62.075 V 58.9875 L 99.45,56.875 98.475,55.25 97.5,54.1125 l -0.8125,-0.65 -0.8125,-0.65 -2.1125,-0.65 H 91.325 l -1.7875,0.65 -1.4625,1.1375 -0.975,1.3 -0.8125,1.7875 -0.325,1.3 V 60.45 l 0.65,2.1125 0.975,1.625 0.975,1.1375 1.3,0.975 1.625,0.8125 1.625,0.4875 v 0.1625 h -2.6 l -2.6,-0.8125 -2.275,-1.625 -1.4625,-1.7875 -1.3,-2.6 -0.4875,-2.275 v -2.275 l 0.65,-2.6 0.975,-1.7875 1.625,-1.95 1.625,-1.1375 1.95,-0.8125 z"
88
+ style="fill:#efe8d8;stroke-width:0.1625"
89
+ id="path11"
90
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccc" />
91
+ <path
92
+ d="m 117.65,18.85 h 2.1125 l 1.7875,0.65 1.625,1.4625 0.8125,1.7875 0.1625,1.3 -0.325,1.95 -0.975,1.625 -1.3,1.1375 -1.7875,0.65 h -1.95 l -1.7875,-0.65 -1.1375,-0.8125 -0.975,-1.4625 -0.4875,-1.1375 v -2.4375 l 0.65,-1.625 1.1375,-1.3 1.95,-0.975 z m 1.7875,3.0875 -0.4875,0.325 -0.1625,0.65 0.4875,0.65 h 0.8125 l 0.325,-0.325 v -0.975 l -0.4875,-0.325 z"
93
+ style="fill:#1c354a;stroke-width:0.1625"
94
+ id="path12" />
95
+ <path
96
+ d="m 74.1,75.725 0.65,0.325 0.4875,0.65 1.3,0.4875 0.975,0.1625 1.95,0.4875 0.325,0.4875 0.8125,0.4875 0.325,0.65 0.8125,0.8125 0.4875,0.4875 0.4875,0.4875 1.1375,2.275 0.325,0.4875 v 0.325 h -1.95 l -4.55,-0.325 -3.4125,-0.65 -4.0625,-1.3 -0.65,-0.325 0.325,-0.65 1.625,-1.625 1.625,-2.4375 z"
97
+ style="fill:#e7683e;stroke-width:0.1625"
98
+ id="path13"
99
+ sodipodi:nodetypes="cccccccccccccccccccccccc" />
100
+ <path
101
+ d="m 124.63749,40.7875 h 2.1125 l 1.4625,0.8125 0.975,1.3 0.1625,0.4875 v 2.275 l -0.65,1.3 -1.1375,0.975 -1.625,0.4875 -1.4625,-0.1625 -1.625,-0.975 -0.8125,-1.1375 -0.325,-1.3 0.1625,-1.4625 0.8125,-1.4625 1.4625,-0.975 z m 0.975,2.275 -0.1625,0.1625 v 0.8125 l 0.1625,0.1625 h 0.8125 l 0.1625,-0.8125 -0.325,-0.325 z"
102
+ style="fill:#1c354a;stroke-width:0.1625"
103
+ id="path14" />
104
+ <text
105
+ xml:space="preserve"
106
+ style="font-size:29.1586px;font-family:'Familjen Grotesk';-inkscape-font-specification:'Familjen Grotesk';text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#fbb034;fill-opacity:1;stroke:#253949;stroke-width:0.665;stroke-opacity:1;stroke-dasharray:none"
107
+ x="199.5256"
108
+ y="49.812157"
109
+ id="text28"
110
+ transform="scale(0.75332836,1.3274424)"><tspan
111
+ sodipodi:role="line"
112
+ id="tspan28"
113
+ x="199.5256"
114
+ y="49.812157"
115
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sixtyfour;-inkscape-font-specification:Sixtyfour;fill:#fbb034;fill-opacity:1;stroke:#253949;stroke-width:0.665;stroke-opacity:1;stroke-dasharray:none">Streamdown_</tspan></text>
116
+ </svg>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "streamdown"
7
- version = "0.14.0"
7
+ version = "0.16.0"
8
8
  description = "A streaming markdown renderer for modern terminals with syntax highlighting"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -31,6 +31,7 @@ dependencies = [
31
31
  "appdirs",
32
32
  "toml",
33
33
  "pylatexenc",
34
+ 'term-image'
34
35
  ]
35
36
 
36
37
  [project.urls]
Binary file
@@ -22,10 +22,10 @@ import subprocess
22
22
  import traceback
23
23
  import colorsys
24
24
  import base64
25
- import importlib
26
25
  from io import BytesIO
27
26
  from term_image.image import from_file, from_url
28
27
  import pygments.util
28
+ from functools import reduce
29
29
  from argparse import ArgumentParser
30
30
  from pygments import highlight
31
31
  from pygments.lexers import get_lexer_by_name
@@ -91,8 +91,8 @@ KEYCODE_RE = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])')
91
91
 
92
92
  visible = lambda x: re.sub(ANSIESCAPE, "", x)
93
93
  visible_length = lambda x: len(visible(x))
94
-
95
94
  extract_ansi_codes = lambda text: re.findall(ESCAPE, text)
95
+ remove_ansi = lambda line, codeList: reduce(lambda line, code: line.replace(code, ''), codeList, line)
96
96
 
97
97
  def debug_write(text):
98
98
  if state.Logging:
@@ -271,6 +271,7 @@ def code_wrap(text_in):
271
271
 
272
272
  return (indent, res)
273
273
 
274
+
274
275
  # This marvelously obscure code "compacts" long lines of repetitive ANSI format strings by
275
276
  # removing duplicates. Here's how it works
276
277
  def ansi_collapse(codelist, inp):
@@ -567,9 +568,10 @@ def parse(stream):
567
568
  # <code><pre>
568
569
  #
569
570
  if not state.in_code:
570
- code_match = re.match(r"\s*```\s*([^\s]+|$)$", line)
571
+ code_match = re.match(r"^\s*```\s*([^\s]+|$)\s*$", line)
571
572
  if code_match:
572
573
  state.in_code = Code.Backtick
574
+ state.code_indent = len(line) - len(line.lstrip())
573
575
  state.code_language = code_match.group(1) or 'Bash'
574
576
 
575
577
  elif state.CodeSpaces and last_line_empty_cache and not state.in_list:
@@ -594,6 +596,7 @@ def parse(stream):
594
596
 
595
597
  if state.in_code:
596
598
  try:
599
+ # This is turning it OFF
597
600
  if not state.code_first_line and (
598
601
  ( state.in_code == Code.Backtick and line.strip() == "```" ) or
599
602
  (state.CodeSpaces and state.in_code == Code.Spaces and not line.startswith(' '))
@@ -623,9 +626,7 @@ def parse(stream):
623
626
  state.emit_flush = True
624
627
  yield RESET
625
628
 
626
-
627
629
  if code_type == Code.Backtick:
628
- state.code_indent = len(line) - len(line.lstrip())
629
630
  continue
630
631
  else:
631
632
  # otherwise we don't want to consume
@@ -665,6 +666,10 @@ def parse(stream):
665
666
  # then naively search back until our visible_lengths() match. This is not fast and there's certainly smarter
666
667
  # ways of doing it but this thing is way trickery than you think
667
668
  highlighted_code = highlight(state.code_buffer + tline, lexer, formatter)
669
+
670
+ # Sometimes the highlighter will do things like a full reset or a background reset.
671
+ # This is not what we want
672
+ highlighted_code = re.sub(r"\033\[39(;00|)m", '', highlighted_code)
668
673
 
669
674
  # Since we are streaming we ignore the resets and newlines at the end
670
675
  if highlighted_code.endswith(FGRESET + "\n"):
@@ -1,5 +1,5 @@
1
1
  #!/bin/bash
2
- TIMEOUT=${TIMEOUT:-0.01}
2
+ TIMEOUT=${TIMEOUT:-0.35}
3
3
 
4
4
  while [[ $# -gt 0 ]]; do
5
5
  echo "## File: $1"
Binary file
@@ -0,0 +1,187 @@
1
+ # Python vs. Go: Let's get ready to rumble!
2
+ ![](https://9ol.es/tmp/pvgo_512.jpg)
3
+
4
+ Python and Go (Golang) are both popular programming languages, but they cater to different needs and philosophies. Here's a detailed comparison:
5
+
6
+
7
+ **Python:**
8
+
9
+ * **Strengths:**
10
+ * **Readability:** Known for its clean and easy-to-understand syntax, emphasizing code readability.
11
+ * **Large Ecosystem:** Vast library support for data science, machine learning, web development, scripting, and more. Packages like NumPy, Pandas, Django, and Flask make complex tasks simpler.
12
+ * **Rapid Development:** Its dynamic typing and interpreted nature allow for quick prototyping and development.
13
+ * **Dynamic Typing:** The interpreter infers data types at runtime, simplifying code (but potentially hiding errors).
14
+ * **Versatility:** Can be used for a wide range of applications – web backends, data analysis, machine learning, automation, scripting, testing, and more.
15
+ * **Community:** Huge and active community providing ample support, tutorials, and resources.
16
+ * **Weaknesses:**
17
+ * **Performance:** Being an interpreted language, Python is generally slower than compiled languages like Go.
18
+ * **Global Interpreter Lock (GIL):** Limits true multi-threading in CPU-bound operations.
19
+ * **Error Handling:** Runtime errors can be more common because of dynamic typing.
20
+ * **Memory Consumption:** Typically has higher memory overhead compared to Go due to its object model and dynamic typing.
21
+
22
+ **Go:**
23
+
24
+ * **Strengths:**
25
+ * **Performance:** Compiled language that produces efficient, native machine code. Generally much faster than Python.
26
+ * **Concurrency:** Built-in support for concurrency through Goroutines (lightweight threads) and Channels, making it easy to write concurrent and parallel programs.
27
+ * **Static Typing:** Helps catch errors at compile-time.
28
+ * **Garbage Collection:** Automatic memory management reduces the risk of memory leaks.
29
+ * **Simplicity:** Designed to be a simple language with a relatively small number of keywords. Focuses on getting things done efficiently.
30
+ * **Scalability:** Well-suited for building scalable network services and distributed systems.
31
+ * **Tooling:** Excellent built-in tooling for testing, formatting, and dependency management.
32
+ * **Weaknesses:**
33
+ * **Learning Curve:** Can be slightly steeper than Python initially, particularly regarding concurrency concepts.
34
+ * **Error Handling:** Explicit error handling (returning errors as values) can lead to verbose code. (While necessary, it's less concise than Python's `try...except`)
35
+ * **Generics (Relatively New):** Generics were only added in Go 1.18 (released in 2022). Prior to that, code reusability for different types was more challenging.
36
+ * **Smaller Ecosystem:** While rapidly growing, Go’s ecosystem is still smaller than Python's, particularly in specialized areas like data science.
37
+
38
+ **Use Cases:**
39
+
40
+ * **Python:** Data science, machine learning, web development (Django, Flask), scripting, automation, prototyping, and educational purposes.
41
+ * **Go:** Cloud infrastructure (Docker, Kubernetes), network services, distributed systems, command-line tools, DevOps, and high-performance backend services.
42
+
43
+
44
+
45
+ ## Code Examples:
46
+
47
+ **1. Hello World:**
48
+
49
+ **Python:**
50
+ ```python
51
+ print("Hello, World!")
52
+ ```
53
+
54
+ **Go:**
55
+ ```go
56
+ package main
57
+
58
+ import "fmt"
59
+
60
+ func main() {
61
+ fmt.Println("Hello, World!")
62
+ }
63
+ ```
64
+
65
+ **2. Simple Web Server:**
66
+
67
+ **Python (using Flask):**
68
+ ```python
69
+ from flask import Flask
70
+
71
+ app = Flask(__name__)
72
+
73
+ @app.route("/")
74
+ def hello_world():
75
+ return "<p>Hello, World!</p>"
76
+
77
+ if __name__ == '__main__':
78
+ app.run(debug=True)
79
+ ```
80
+
81
+ **Go (using net/http):**
82
+ ```go
83
+ package main
84
+
85
+ import (
86
+ "fmt"
87
+ "net/http"
88
+ )
89
+
90
+ func handler(w http.ResponseWriter, r *http.Request) {
91
+ fmt.Fprintf(w, "Hello, World!")
92
+ }
93
+
94
+ func main() {
95
+ http.HandleFunc("/", handler)
96
+ fmt.Println("Server listening on port 8080")
97
+ http.ListenAndServe(":8080", nil)
98
+ }
99
+ ```
100
+
101
+ **3. Concurrent Processing (Simple):**
102
+
103
+ **Python (using threading - limited by GIL):**
104
+
105
+ ```python
106
+ import threading
107
+
108
+ def process_task(task_id):
109
+ print(f"Task {task_id} started")
110
+ # Simulate some work
111
+ import time
112
+ time.sleep(2)
113
+ print(f"Task {task_id} completed")
114
+
115
+ tasks = [1, 2, 3]
116
+ threads = []
117
+
118
+ for task in tasks:
119
+ thread = threading.Thread(target=process_task, args=(task,))
120
+ threads.append(thread)
121
+ thread.start()
122
+
123
+ for thread in threads:
124
+ thread.join()
125
+
126
+ print("All tasks completed.")
127
+ ```
128
+
129
+ **Go (using Goroutines and Channels):**
130
+
131
+ ```go
132
+ package main
133
+
134
+ import (
135
+ "fmt"
136
+ "sync"
137
+ )
138
+
139
+ func processTask(taskID int, wg *sync.WaitGroup) {
140
+ defer wg.Done() // Decrement the WaitGroup counter when the goroutine completes.
141
+ fmt.Printf("Task %d started\n", taskID)
142
+ // Simulate some work
143
+ //time.Sleep(2 * time.Second) // Go uses time.Second, etc.
144
+ fmt.Printf("Task %d completed\n", taskID)
145
+ }
146
+
147
+ func main() {
148
+ var wg sync.WaitGroup
149
+ tasks := []int{1, 2, 3}
150
+
151
+ for _, task := range tasks {
152
+ wg.Add(1) // Increment the WaitGroup counter for each goroutine.
153
+ go processTask(task, &wg)
154
+ }
155
+
156
+ wg.Wait()
157
+ fmt.Println("All tasks completed.")
158
+ }
159
+ ```
160
+
161
+
162
+ ## Comparative Table of Features:
163
+
164
+ | Feature | Python | Go (Golang) |
165
+ |----------------------|----------------------------------|-------------------------------|
166
+ | **Typing** | Dynamic, strong | Static, strong |
167
+ | **Compilation** | Interpreted | Compiled |
168
+ | **Performance** | Generally slower | Generally faster |
169
+ | **Concurrency** | Through threads (GIL limited) | Goroutines & Channels (built-in) |
170
+ | **Error Handling** | Exceptions (try-except) | Explicit error values |
171
+ | **Memory Management**| Automatic (Garbage Collection) | Automatic (Garbage Collection) |
172
+ | **Syntax** | Readable, concise | Simple, explicit |
173
+ | **Ecosystem** | Huge, mature | Growing, focused |
174
+ | **Learning Curve** | Easier | Moderate |
175
+ | **Generics** | Present | Added in 1.18 (relatively new)|
176
+ | **Typical Use Cases**| Data science, web dev, scripting | Cloud, networking, system programming |
177
+ | **Community** | Very large, active | Growing, dedicated |
178
+ | **Object Orientation**| Full support | Structs with methods, interfaces|
179
+
180
+
181
+
182
+ **In Summary:**
183
+
184
+ * **Choose Python if:** You need rapid development, a large ecosystem of libraries, or are focused on data science, machine learning, or scripting. Readability and ease of use are priorities.
185
+
186
+ * **Choose Go if:** You need high performance, concurrency, scalability, and are building infrastructure, network services, or command-line tools. Deterministic error handling and a simple, efficient language are key.
187
+
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes