Skip to content

why multiline basic string can ends with " inside now, while multiline literal string still can't ends with '? #725

@LongTengDao

Description

@LongTengDao

I saw this is valid in v1.0.0-rc.1 now, which is different from v0.5.0:

str = """she said: "...""""

But what's the rule, how should I write the parser, and remember it while writing toml config file? Is this valid too?

str = """..."""""

even:

str = """...""""""

?

If they are all valid, then why this is invalid?

str = '''15: ''''''''''''''''''

I saw "You can write 1 or 2 single quotes anywhere within a multi-line literal string, but sequences of three or more single quotes are not permitted." in the spec.

Does this mean that, both multiline basic/literal can include ending quote marks, only if they are shorter than three? If so, I don't think current doc said it clear, neither explains nor examples.

PR is easy, but need to make sure at first.

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