pub fn markdown_file_to_html(
input: Option<impl AsRef<Path>>,
output: Option<OutputDestination>,
config: Option<MarkdownConfig>,
) -> Result<()>
Expand description
Converts a Markdown file to HTML.
This function reads from a file or stdin and writes the generated HTML to a specified destination. It handles encoding/decoding of content.
§Arguments
input
- The input source (file path or None for stdin)output
- The output destination (defaults to stdout)config
- Optional configuration including encoding settings
§Returns
Returns `Ok
§Errors
Returns an error if:
- Input file is not found or cannot be read
- Output file cannot be written
- Configuration is invalid
- Input size exceeds configured maximum