in scripts/workbook_create.py [0:0]
def serialize_data(workbook_string):
if workbook_string:
# Escape double quotes
workbook_string = str(workbook_string).replace('"', '\"')
# Escape escape characters
# workbook_string = str(workbook_string).replace('\\', '\\\\')
# Undo the scaping for the newline character (otherwise the markdown in the workbook would look wrong).
# Note that this might impact newline characters in queries!
# workbook_string = str(workbook_string).replace('\\\\n', '\\n')
return workbook_string
else:
return None