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" )