Skip to content

convert_README_to_header.sh doesn't escape double-quotes in README.md file #1489

Description

@Lotharyx

Double-quotes in a README.md file will lead to broken code in the WhateverPluginDescription.h file because they do not get escaped.

The fix is to modify the call to sed as follows:

# See http://stackoverflow.com/a/16576291
# On Mac OS's sed, \n is not recognized as a newline character, but
# \[actual newline] works
desc=`sed -e ':a' -e 'N' -e '$!ba' -e 's/\"/\\\"/g' -e 's/\n/\\\\n"\\
"/g' "$path/README.md"`;

The change is the addition of -e 's/\"/\\\"/g' argument.

I hit this writing a plugin that has no use outside my very specific scenario (involving hardware I built) so I just figured I'd report it here rather than going to the trouble of forking and submitting a pull request for a handful of characters in a single file; I hope that's okay.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions