Skip to content

Commit 8d91413

Browse files
committed
Ensures newline (\n) denotation renders correctly.
1 parent 9b879c9 commit 8d91413

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/page.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ In a nutshell, this is what you can do with PyMuPDF:
504504
* ``bbox``: the bounding box of the table as a tuple `(x0, y0, x1, y1)`.
505505
* ``cells``: bounding boxes of the table's cells (list of tuples). A cell may also be `None`.
506506
* ``extract()``: this method returns the text content of each table cell as a list of list of strings.
507-
* ``to_markdown()``: this method returns the table as a **string in markdown format** (compatible to Github). Markdown viewers can render the string as a table. This output is optimized for **small token** sizes, which is especially beneficial for LLM/RAG feeds. Pandas DataFrames (see method `to_pandas()` below) offer an equivalent markdown table output which however is better readable for the human eye. Any line breaks (`\n`) in cells are replaced by HTML line breaks tags `<br>`.
507+
* ``to_markdown()``: this method returns the table as a **string in markdown format** (compatible to Github). Markdown viewers can render the string as a table. This output is optimized for **small token** sizes, which is especially beneficial for LLM/RAG feeds. Pandas DataFrames (see method `to_pandas()` below) offer an equivalent markdown table output which however is better readable for the human eye. Any line breaks (``\n``) in cells are replaced by HTML line breaks tags `<br>`.
508508
* `to_pandas()`: this method returns the table as a `pandas <https://pypi.org/project/pandas/>`_ `DataFrame <https://pandas.pydata.org/docs/reference/frame.html>`_. DataFrames are very versatile objects allowing a plethora of table manipulation methods and outputs to almost 20 well-known formats, among them Excel files, CSV, JSON, markdown-formatted tables and more. `DataFrame.to_markdown()` generates a Github-compatible markdown format optimized for human readability. This method however requires the package `tabulate <https://pypi.org/project/tabulate/>`_ to be installed in addition to pandas itself.
509509
* ``header``: a `TableHeader` object containing header information of the table.
510510
* ``col_count``: an integer containing the number of table columns.

0 commit comments

Comments
 (0)