streamdown 0.24.0__tar.gz → 0.25.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.
- {streamdown-0.24.0 → streamdown-0.25.0}/PKG-INFO +1 -1
- {streamdown-0.24.0 → streamdown-0.25.0}/pyproject.toml +1 -1
- {streamdown-0.24.0 → streamdown-0.25.0}/streamdown/sd.py +9 -7
- {streamdown-0.24.0 → streamdown-0.25.0}/.gitignore +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/LICENSE.MIT +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/README.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/requirements.txt +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/streamdown/__init__.py +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/streamdown/plugins/README.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/streamdown/plugins/latex.py +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/README.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/backtick-with-post-spaces.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/block.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/bold_reset_with_link.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/broken-code.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/broken-example.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/chunk-buffer.sh +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/cjk-table.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/cjk-wrap.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/code.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/example.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/fizzbuzz.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/inline.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/jimmy_webb.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/line-buffer.sh +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/line-wrap.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/links.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/managerie.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/mandlebrot.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/markdown.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/nested-example.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/outline.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/pvgo_512.jpg +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/pythonvgo.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/qwen3.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/rerun.zsh +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/slash.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/strip-chunks.sh +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/table-break.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/table_test.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/test.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/test_input.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tests/wm.md +0 -0
- {streamdown-0.24.0 → streamdown-0.25.0}/tools/deploy.sh +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: streamdown
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.25.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
|
|
@@ -104,19 +104,22 @@ visible_length = lambda x: len(visible(x)) + dbl_count(x)
|
|
|
104
104
|
extract_ansi_codes = lambda text: re.findall(ESCAPE, text)
|
|
105
105
|
remove_ansi = lambda line, codeList: reduce(lambda line, code: line.replace(code, ''), codeList, line)
|
|
106
106
|
|
|
107
|
+
def gettmpdir():
|
|
108
|
+
tmp_dir_all = os.path.join(tempfile.gettempdir(), "sd")
|
|
109
|
+
os.makedirs(tmp_dir_all, mode=0o777, exist_ok=True)
|
|
110
|
+
tmp_dir = os.path.join(tmp_dir_all, str(os.getuid()))
|
|
111
|
+
os.makedirs(tmp_dir, exist_ok=True)
|
|
112
|
+
return tmp_dir
|
|
113
|
+
|
|
107
114
|
def debug_write(text):
|
|
108
115
|
if state.Logging:
|
|
109
116
|
if state.Logging == True:
|
|
110
|
-
|
|
111
|
-
os.makedirs(tmp_dir, exist_ok=True)
|
|
112
|
-
state.Logging = tempfile.NamedTemporaryFile(dir=tmp_dir, prefix="dbg", delete=False, mode="wb")
|
|
117
|
+
state.Logging = tempfile.NamedTemporaryFile(dir=gettmpdir(), prefix="dbg", delete=False, mode="wb")
|
|
113
118
|
state.Logging.write(text)
|
|
114
119
|
|
|
115
120
|
def savebrace():
|
|
116
121
|
if state.Savebrace and state.code_buffer_raw:
|
|
117
|
-
|
|
118
|
-
os.makedirs(tmp_dir, exist_ok=True)
|
|
119
|
-
path = os.path.join(tempfile.gettempdir(), "sd", 'savebrace')
|
|
122
|
+
path = os.path.join(gettmpdir(), 'savebrace')
|
|
120
123
|
with open(path, "a") as f:
|
|
121
124
|
f.write(state.code_buffer_raw + "\x00")
|
|
122
125
|
f.flush()
|
|
@@ -514,7 +517,6 @@ def line_format(line):
|
|
|
514
517
|
state.code_buffer_raw += token
|
|
515
518
|
|
|
516
519
|
elif token == '~~' and (state.in_strikeout or not_text(prev_token)):
|
|
517
|
-
print("in strike")
|
|
518
520
|
state.in_strikeout = not state.in_strikeout
|
|
519
521
|
result += STRIKEOUT[0] if state.in_strikeout else STRIKEOUT[1]
|
|
520
522
|
|
|
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
|
|
File without changes
|