Skip to content

Consider escaping by doubling the special characters #346

Closed
@stasm

Description

@stasm

Text is defined such that backslashes in the text must be escaped, e.g. \u12AB is required to be \\u12AB or \n is required to be \\n. I'm okay with requiring { and } literals to be escaped.

I am nervous that we're recreating the apostrophe disaster in MF1 by requiring every backslash to be escaped. Developers use e.g. \n or other escapes in strings all the time. Making double escapes out of them doesn't seem to be required except to allow for the literal \{ or \} to appear in a string.

I think we might be better off by making the placeholder markers self-escaping, e.g. if you want to have a literal { use {{. { and } are rare enough in real text that this might be much less of an impact than requiring every backslash to be doubled.

Originally posted by @aphillips in #344 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocker-candidateThe submitter thinks this might be a block for the next releaseresolve-candidateThis issue appears to have been answered or resolved, and may be closed soon.syntaxIssues related with syntax or ABNF

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions