Skip to content

Commit

Permalink
Added a test for leading spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
afourney committed Jan 3, 2025
1 parent 08ed328 commit 5452c6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_markitdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ def test_markitdown_local() -> None:
result = markitdown.convert(os.path.join(TEST_FILES_DIR, "test_outlook_msg.msg"))
validate_strings(result, MSG_TEST_STRINGS)

# Test input with leading blank characters
input_data = b" \n\n\n<html><body><h1>Test</h1></body></html>"
result = markitdown.convert_stream(io.BytesIO(input_data), file_extension=".html")
assert "# Test" in result.text_content


@pytest.mark.skipif(
skip_exiftool,
Expand Down

0 comments on commit 5452c6b

Please sign in to comment.