markdown2C.cmake: refinement: accept " in .md files.

This commit is contained in:
jean-pierre charras 2019-09-30 08:58:53 +02:00
parent 3a35c75d09
commit c5ba341d5b
1 changed files with 2 additions and 1 deletions

View File

@ -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" ) 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 # 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 # Write the buffer between quotes
file( APPEND ${outputFile} "_HKI( \"" ${buff_m} "\" )\n" ) file( APPEND ${outputFile} "_HKI( \"" ${buff_m} "\" )\n" )