Skip to content

TOML: Multi-line string lexing issue when using same quote character #2488

@martin-martin

Description

@martin-martin

Using the TOML syntax highlighter breaks in multi-line strings when re-using the same quote character in the text body:

negative_reasoning = """The customer uses the 😤 emoji and seems aggravated,
so the sentiment is negative."""
negative_output = """
{
  "negative": [
    {
      "date": "2023-07-24",
      "conversation": [
        "A: What can I help you with?",
        "C: I CAN'T CONNECT TO MY 😤 ACCOUNT",
        "A: Are you sure it's not your caps lock?",
        "C: 😤! You're right!"
      ]
    }
  ]
}
"""

Renders like so:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions