[][src]Function tp_note::filter::path_filter

pub fn path_filter<S: BuildHasher>(
    value: &Value,
    args: &HashMap<String, Value, S>
) -> TeraResult<Value>

Add a new filter to Tera templates: path or path() sanitizes a string so that it can be used to assemble filenames or paths. In addition, path(alpha=true) prepends an apostroph when the result starts with a number. This way we guaranty that the filename never starts with a number. We do not allow this, to be able to distinguish reliably the sort tag from the filename.