_value = md_to_html(f.read())
else:
_value = f.read()
- file_value = regex_execute.sub(_value, file_value, 1)
+ file_value = regex_execute.sub(_value.replace("\\", "\\\\"), file_value, 1)
while variable := regex_variable.search(file_value):
varspace = variable.group(1).split(".")
try:
else:
varspace = namespace + tuple(varspace)
file_value = regex_variable.sub(
- str(get_value(data, varspace[:-1], varspace[-1])), file_value, 1
+ str(get_value(data, varspace[:-1], varspace[-1])).replace("\\", "\\\\"),
+ file_value,
+ 1,
)
return file_value
out_file.write(get_value(data, path, "_value"))
-
def main(args):
# Load toml file
data = tomllib.load(args.data)