process_file_includes

Function process_file_includes 

Source
pub fn process_file_includes(markdown: &str, base_dir: &Path) -> String
Expand description

Process file includes in Nixpkgs/NixOS documentation.

This function processes file include syntax:

```{=include=}
path/to/file1.md
path/to/file2.md
```

§Arguments

  • markdown - The input markdown text
  • base_dir - The base directory for resolving relative file paths

§Returns

The processed markdown text with included files expanded

§Safety

Only relative paths without “..” are allowed for security.