Read Markdown text from a file or stream and write HTML output to a file or stream. This is a shortcut function which initializes an instance of [`Markdown`][markdown.Markdown], and calls the [`convertFile`][markdown.Markdown.convertFile] method rather than [`convert`][markdown.Mar
(**kwargs: Any)
| 503 | |
| 504 | |
| 505 | def markdownFromFile(**kwargs: Any): |
| 506 | """ |
| 507 | Read Markdown text from a file or stream and write HTML output to a file or stream. |
| 508 | |
| 509 | This is a shortcut function which initializes an instance of [`Markdown`][markdown.Markdown], |
| 510 | and calls the [`convertFile`][markdown.Markdown.convertFile] method rather than |
| 511 | [`convert`][markdown.Markdown.convert]. |
| 512 | |
| 513 | Keyword arguments: |
| 514 | input (str | BinaryIO): A file name or readable object. |
| 515 | output (str | BinaryIO): A file name or writable object. |
| 516 | encoding (str): Encoding of input and output. |
| 517 | **kwargs: Any arguments accepted by the `Markdown` class. |
| 518 | |
| 519 | !!! warning |
| 520 | The Python-Markdown library does ***not*** sanitize its HTML output. |
| 521 | As `markdown.markdownFromFile` writes directly to the file system, there is no |
| 522 | easy way to sanitize the output from Python code. Therefore, it is |
| 523 | recommended that the `markdown.markdownFromFile` function not be used on input |
| 524 | from an untrusted source. For more information see [Sanitizing HTML |
| 525 | Output](../../sanitization.md). |
| 526 | |
| 527 | """ |
| 528 | md = Markdown(**kwargs) |
| 529 | md.convertFile(kwargs.get('input', None), |
| 530 | kwargs.get('output', None), |
| 531 | kwargs.get('encoding', None)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…