MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / convert_stdin

Function convert_stdin

markdown_it/cli/parse.py:36–45  ·  view source on GitHub ↗

Parse a Markdown file and dump the output to stdout.

()

Source from the content-addressed store, hash-verified

34
35
36def 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
48def convert_file(filename: str) -> None:

Callers 1

mainFunction · 0.85

Calls 2

MarkdownItClass · 0.90
renderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…