From c5ba341d5b37c23653267e2ec587767a97683704 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 30 Sep 2019 08:58:53 +0200 Subject: [PATCH] markdown2C.cmake: refinement: accept " in .md files. --- CMakeModules/markdown2C.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeModules/markdown2C.cmake b/CMakeModules/markdown2C.cmake index cabf134849..bb898fe7a4 100644 --- a/CMakeModules/markdown2C.cmake +++ b/CMakeModules/markdown2C.cmake @@ -8,7 +8,8 @@ file( READ ${inputFile} buffer ) file( WRITE ${outputFile} "// Do not edit this file, it is autogenerated by CMake from an .md file\n" ) # Replace each EOL char by "\n" + " + EOL -STRING(REGEX REPLACE "\n" "\\\\n\"\n\"" buff_m ${buffer}) +STRING(REGEX REPLACE "\"" "\\\\\"" linem ${buffer}) +STRING(REGEX REPLACE "\n" "\\\\n\"\n\"" buff_m ${linem}) # Write the buffer between quotes file( APPEND ${outputFile} "_HKI( \"" ${buff_m} "\" )\n" )