Skip to content

stamp.sh doesn't handle double quotes in the project description #411

Description

@ispeters

On my first run of ./stamp.sh, I answered the "description" question with a string containing bare double quotes; the result was (what I think is) a broken CMakeLists.txt:

include(infra/cmake/enable-experimental-import-std.cmake)

project(
    beman.my_project
    DESCRIPTION "My description containing "
    quoted" characters"
    LANGUAGES CXX
    VERSION 0.1.0
)

I re-ran ./stamp.sh and escaped the quotes with \, which fixed the CMakeLists.txt file:

include(infra/cmake/enable-experimental-import-std.cmake)

project(
    beman.my_project
    DESCRIPTION "My description containing \"quoted\" characters"
    LANGUAGES CXX
    VERSION 0.1.0
)

but now README.md contains this:

# beman.my_project: My description containing \"quoted\" characters

which is a context where the double quotes don't need escaping.

I can fix this manually and people can just not put quotes in their descriptions, but more robust handling would be sweet (presumably this is "just" escaping quote characters when generating the CMakeLists.txt file…).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions