MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / test_md_styles

Function test_md_styles

tests/test_tables.py:453–460  ·  view source on GitHub ↗

Test output of table with MD-styled cells.

()

Source from the content-addressed store, hash-verified

451
452
453def test_md_styles():
454 """Test output of table with MD-styled cells."""
455 filename = os.path.join(scriptdir, "resources", "test-styled-table.pdf")
456 doc = pymupdf.open(filename)
457 page = doc[0]
458 tabs = page.find_tables()[0]
459 text = """|Column 1|Column 2|Column 3|\n|---|---|---|\n|Zelle (0,0)|**Bold (0,1)**|Zelle (0,2)|\n|~~Strikeout (1,0), Zeile 1~~<br>~~Hier kommt Zeile 2.~~|Zelle (1,1)|~~Strikeout (1,2)~~|\n|**`Bold-monospaced`**<br>**`(2,0)`**|_Italic (2,1)_|**_Bold-italic_**<br>**_(2,2)_**|\n|Zelle (3,0)|~~**Bold-strikeout**~~<br>~~**(3,1)**~~|Zelle (3,2)|\n\n"""
460 assert tabs.to_markdown() == text

Callers

nothing calls this directly

Calls 1

to_markdownMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…