Skip to main content

substitute_variables

Function substitute_variables 

Source
pub fn substitute_variables(input: &str, context: &TemplateContext) -> String
Expand description

Substitute variables in a template string

Supported variables:

  • {{target}} - The target file/path provided by user
  • {{module}} - Module name derived from target
  • {{file}} - Filename only
  • {{branch}} - Current git branch name