Parse a Markdown file and dump the output to stdout.
()
| 34 | |
| 35 | |
| 36 | def convert_stdin() -> None: |
| 37 | """ |
| 38 | Parse a Markdown file and dump the output to stdout. |
| 39 | """ |
| 40 | try: |
| 41 | rendered = MarkdownIt().render(sys.stdin.read()) |
| 42 | print(rendered, end="") |
| 43 | except OSError: |
| 44 | sys.stderr.write("Cannot parse Markdown from the standard input.\n") |
| 45 | sys.exit(1) |
| 46 | |
| 47 | |
| 48 | def convert_file(filename: str) -> None: |
no test coverage detected
searching dependent graphs…