Skip to main content

format_file_block

Function format_file_block 

Source
pub fn format_file_block(path: &str, content: &str) -> String
Expand description

Formats a file’s content as a markdown code block.

§Arguments

  • path - The file path (used for display and language detection)
  • content - The file contents

§Returns

A markdown-formatted string with the file header and code fence

§Format

## File: {path}
```{lang}
{content}
```