mirror of
https://github.com/szymon-jozef/static-site-generator.git
synced 2026-09-07 12:10:42 +02:00
added format_file_conditionally()
This commit is contained in:
@@ -7,3 +7,13 @@
|
||||
// @return Formatted file in std::string
|
||||
std::string format_file(const std::string &TEMPLATE_FILE,
|
||||
const std::string &TEMPLATE, const std::string &INPUT);
|
||||
|
||||
// @brief Format file conditionally. Replace everything between `{{if
|
||||
// _something_}}` to `{{endif}}` If INPUT is empty then everything between
|
||||
// this will be removed.
|
||||
// @param TEMPLATE_FILE File that you want to format in string.
|
||||
// @param TEMPLATE Full name of the if statement. For example `{{if title}}`
|
||||
// @return Formatted file in std::string
|
||||
std::string format_file_condtionally(const std::string &TEMPLATE_FILE,
|
||||
const std::string &TEMPLATE,
|
||||
const std::string &INPUT);
|
||||
|
||||
Reference in New Issue
Block a user