streamdown 0.33.0__tar.gz → 0.34.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 (90) hide show
  1. {streamdown-0.33.0 → streamdown-0.34.0}/PKG-INFO +1 -1
  2. {streamdown-0.33.0 → streamdown-0.34.0}/pyproject.toml +1 -1
  3. {streamdown-0.33.0 → streamdown-0.34.0}/streamdown/sd.py +10 -2
  4. streamdown-0.34.0/streamdown/test.txt +1 -0
  5. streamdown-0.34.0/tests/no-newline.md +1 -0
  6. streamdown-0.34.0/tests/run-tests.sh +9 -0
  7. {streamdown-0.33.0 → streamdown-0.34.0}/tools/deploy.sh +1 -1
  8. {streamdown-0.33.0 → streamdown-0.34.0}/.aider.chat.history.md +0 -0
  9. {streamdown-0.33.0 → streamdown-0.34.0}/.aider.input.history +0 -0
  10. {streamdown-0.33.0 → streamdown-0.34.0}/.aider.tags.cache.v4/cache.db +0 -0
  11. {streamdown-0.33.0 → streamdown-0.34.0}/.envrc +0 -0
  12. {streamdown-0.33.0 → streamdown-0.34.0}/.gitignore +0 -0
  13. {streamdown-0.33.0 → streamdown-0.34.0}/.vimrc +0 -0
  14. {streamdown-0.33.0 → streamdown-0.34.0}/24-bit-color.sh +0 -0
  15. {streamdown-0.33.0 → streamdown-0.34.0}/LICENSE.MIT +0 -0
  16. {streamdown-0.33.0 → streamdown-0.34.0}/README.md +0 -0
  17. {streamdown-0.33.0 → streamdown-0.34.0}/assets/logo.png +0 -0
  18. {streamdown-0.33.0 → streamdown-0.34.0}/assets/logo.svg +0 -0
  19. {streamdown-0.33.0 → streamdown-0.34.0}/configurable.png +0 -0
  20. {streamdown-0.33.0 → streamdown-0.34.0}/copyable.png +0 -0
  21. {streamdown-0.33.0 → streamdown-0.34.0}/dunder.png +0 -0
  22. {streamdown-0.33.0 → streamdown-0.34.0}/error.txt +0 -0
  23. {streamdown-0.33.0 → streamdown-0.34.0}/math +0 -0
  24. {streamdown-0.33.0 → streamdown-0.34.0}/newdir/file_0.py +0 -0
  25. {streamdown-0.33.0 → streamdown-0.34.0}/newdir/file_1.rb +0 -0
  26. {streamdown-0.33.0 → streamdown-0.34.0}/newdir/file_2.jl +0 -0
  27. {streamdown-0.33.0 → streamdown-0.34.0}/passthrough.py +0 -0
  28. {streamdown-0.33.0 → streamdown-0.34.0}/pygments.util +0 -0
  29. {streamdown-0.33.0 → streamdown-0.34.0}/python-go.png +0 -0
  30. {streamdown-0.33.0 → streamdown-0.34.0}/re +0 -0
  31. {streamdown-0.33.0 → streamdown-0.34.0}/requirements.txt +0 -0
  32. {streamdown-0.33.0 → streamdown-0.34.0}/shutil +0 -0
  33. {streamdown-0.33.0 → streamdown-0.34.0}/somelog.txt +0 -0
  34. {streamdown-0.33.0 → streamdown-0.34.0}/ss-new.py +0 -0
  35. {streamdown-0.33.0 → streamdown-0.34.0}/ss.py +0 -0
  36. {streamdown-0.33.0 → streamdown-0.34.0}/streamdown/__init__.py +0 -0
  37. {streamdown-0.33.0 → streamdown-0.34.0}/streamdown/plugins/README.md +0 -0
  38. {streamdown-0.33.0 → streamdown-0.34.0}/streamdown/plugins/latex.py +0 -0
  39. {streamdown-0.33.0 → streamdown-0.34.0}/streamdown/qwen3.md +0 -0
  40. {streamdown-0.33.0 → streamdown-0.34.0}/streamdown/ss +0 -0
  41. {streamdown-0.33.0 → streamdown-0.34.0}/streamdown/ss1 +0 -0
  42. {streamdown-0.33.0 → streamdown-0.34.0}/subprocess +0 -0
  43. {streamdown-0.33.0 → streamdown-0.34.0}/table.png +0 -0
  44. {streamdown-0.33.0 → streamdown-0.34.0}/temp.py +0 -0
  45. {streamdown-0.33.0 → streamdown-0.34.0}/test.py +0 -0
  46. {streamdown-0.33.0 → streamdown-0.34.0}/tester.py +0 -0
  47. {streamdown-0.33.0 → streamdown-0.34.0}/tests/README.md +0 -0
  48. {streamdown-0.33.0 → streamdown-0.34.0}/tests/backtick-with-post-spaces.md +0 -0
  49. {streamdown-0.33.0 → streamdown-0.34.0}/tests/bg-messed-up.md +0 -0
  50. {streamdown-0.33.0 → streamdown-0.34.0}/tests/blankie.md +0 -0
  51. {streamdown-0.33.0 → streamdown-0.34.0}/tests/block.md +0 -0
  52. {streamdown-0.33.0 → streamdown-0.34.0}/tests/bold_reset_with_link.md +0 -0
  53. {streamdown-0.33.0 → streamdown-0.34.0}/tests/broken-code.md +0 -0
  54. {streamdown-0.33.0 → streamdown-0.34.0}/tests/broken-example.md +0 -0
  55. {streamdown-0.33.0 → streamdown-0.34.0}/tests/chinese.md +0 -0
  56. {streamdown-0.33.0 → streamdown-0.34.0}/tests/chunk-buffer.sh +0 -0
  57. {streamdown-0.33.0 → streamdown-0.34.0}/tests/cjj.mv +0 -0
  58. {streamdown-0.33.0 → streamdown-0.34.0}/tests/cjk-comment.md +0 -0
  59. {streamdown-0.33.0 → streamdown-0.34.0}/tests/cjk-table.md +0 -0
  60. {streamdown-0.33.0 → streamdown-0.34.0}/tests/cjk-wrap.md +0 -0
  61. {streamdown-0.33.0 → streamdown-0.34.0}/tests/code.md +0 -0
  62. {streamdown-0.33.0 → streamdown-0.34.0}/tests/dimcheck.md +0 -0
  63. {streamdown-0.33.0 → streamdown-0.34.0}/tests/example.md +0 -0
  64. {streamdown-0.33.0 → streamdown-0.34.0}/tests/fizzbuzz.md +0 -0
  65. {streamdown-0.33.0 → streamdown-0.34.0}/tests/fucking-garbage.md +0 -0
  66. {streamdown-0.33.0 → streamdown-0.34.0}/tests/inline.md +0 -0
  67. {streamdown-0.33.0 → streamdown-0.34.0}/tests/jimmy_webb.md +0 -0
  68. {streamdown-0.33.0 → streamdown-0.34.0}/tests/line-buffer.sh +0 -0
  69. {streamdown-0.33.0 → streamdown-0.34.0}/tests/line-wrap.md +0 -0
  70. {streamdown-0.33.0 → streamdown-0.34.0}/tests/links.md +0 -0
  71. {streamdown-0.33.0 → streamdown-0.34.0}/tests/managerie.md +0 -0
  72. {streamdown-0.33.0 → streamdown-0.34.0}/tests/mandlebrot.md +0 -0
  73. {streamdown-0.33.0 → streamdown-0.34.0}/tests/markdown.md +0 -0
  74. {streamdown-0.33.0 → streamdown-0.34.0}/tests/nested-example.md +0 -0
  75. {streamdown-0.33.0 → streamdown-0.34.0}/tests/oneline-equal.md +0 -0
  76. {streamdown-0.33.0 → streamdown-0.34.0}/tests/outline.md +0 -0
  77. {streamdown-0.33.0 → streamdown-0.34.0}/tests/output.txt +0 -0
  78. {streamdown-0.33.0 → streamdown-0.34.0}/tests/pvgo_512.jpg +0 -0
  79. {streamdown-0.33.0 → streamdown-0.34.0}/tests/pythonvgo.md +0 -0
  80. {streamdown-0.33.0 → streamdown-0.34.0}/tests/qwen3.md +0 -0
  81. {streamdown-0.33.0 → streamdown-0.34.0}/tests/rerun.zsh +0 -0
  82. {streamdown-0.33.0 → streamdown-0.34.0}/tests/slash.md +0 -0
  83. {streamdown-0.33.0 → streamdown-0.34.0}/tests/strip-chunks.sh +0 -0
  84. {streamdown-0.33.0 → streamdown-0.34.0}/tests/table-break.md +0 -0
  85. {streamdown-0.33.0 → streamdown-0.34.0}/tests/table_test.md +0 -0
  86. {streamdown-0.33.0 → streamdown-0.34.0}/tests/test.md +0 -0
  87. {streamdown-0.33.0 → streamdown-0.34.0}/tests/test_input.md +0 -0
  88. {streamdown-0.33.0 → streamdown-0.34.0}/tests/uline.md +0 -0
  89. {streamdown-0.33.0 → streamdown-0.34.0}/tests/wm.md +0 -0
  90. {streamdown-0.33.0 → streamdown-0.34.0}/tty +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamdown
3
- Version: 0.33.0
3
+ Version: 0.34.0
4
4
  Summary: A streaming markdown renderer for modern terminals with syntax highlighting
5
5
  Project-URL: Homepage, https://github.com/day50-dev/Streamdown
6
6
  Project-URL: Bug Tracker, https://github.com/day50-dev/Streamdown/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "streamdown"
7
- version = "0.33.0"
7
+ version = "0.34.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"
@@ -605,6 +605,7 @@ def parse(stream):
605
605
  elif stream.fileno() in ready_in:
606
606
  byte = os.read(stream.fileno(), 1)
607
607
  TimeoutIx = 0
608
+
608
609
  elif TimeoutIx == 0:
609
610
  # This is our record separator for debugging - hands peaking
610
611
  debug_write("🫣".encode('utf-8'))
@@ -614,7 +615,13 @@ def parse(stream):
614
615
  byte = stream.read(1)
615
616
 
616
617
  if byte is not None:
617
- if byte == b'': break
618
+ # This is the eol
619
+ if byte == b'':
620
+ if len(state.buffer) == 0:
621
+ break
622
+ else:
623
+ byte = b'\n'
624
+
618
625
  state.buffer += byte
619
626
  debug_write(byte)
620
627
 
@@ -622,6 +629,7 @@ def parse(stream):
622
629
 
623
630
  line = state.buffer.decode('utf-8').replace('\t',' ')
624
631
  state.has_newline = line.endswith('\n')
632
+
625
633
  # I hate this. There should be better ways.
626
634
  state.maybe_prompt = not state.has_newline and state.current()['none'] and re.match(r'^.*>\s+$', visible(line))
627
635
 
@@ -666,7 +674,7 @@ def parse(stream):
666
674
  yield FGRESET
667
675
  state.block_depth = 0
668
676
 
669
- # --- Collapse Multiple Empty Lines if not in code blocks ---
677
+ # Collapse Multiple Empty Lines if not in code blocks
670
678
  if not state.in_code:
671
679
  is_empty = line.strip() == ""
672
680
 
@@ -0,0 +1 @@
1
+ hi
@@ -0,0 +1 @@
1
+ Print me
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+ {
3
+ for i in *.md; do
4
+ echo "($i: [[ start ]])"
5
+ ../streamdown/sd.py $i | sed "s/^/$i: /g"
6
+
7
+ echo "($i: [[ end ]])"
8
+ done
9
+ }
@@ -12,5 +12,5 @@ pipy() {
12
12
  python3 -m build .
13
13
  twine upload dist/*${version}*
14
14
  }
15
- #tag_update
15
+ tag_update
16
16
  pipy
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
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