We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32bb49c commit 6d9695aCopy full SHA for 6d9695a
1 file changed
packages/markitdown/tests/test_csv_pipe_fix.py
@@ -0,0 +1,23 @@
1
+import io
2
+from markitdown.converters._csv_converter import CsvConverter
3
+from markitdown._stream_info import StreamInfo
4
+
5
+# Test CSV with pipe characters
6
+csv_content = b"""name,description
7
+John|Doe,Developer|Engineer
8
+Alice,Manager|Lead"""
9
10
+converter = CsvConverter()
11
+stream_info = StreamInfo(extension=".csv", charset="utf-8")
12
13
+result = converter.convert(
14
+ io.BytesIO(csv_content),
15
+ stream_info
16
+)
17
18
+print(result.markdown)
19
+# Output should have escaped pipes:
20
+# | name | description |
21
+# | --- | --- |
22
+# | John\|Doe | Developer\|Engineer |
23
+# | Alice | Manager\|Lead |
0 commit comments