Skip to content

Incorrect parsing of newlines within single quotes #241

Open
@liamlundy

Description

@liamlundy

Loading data with newlines in single quotes doesn't behave according to the YAML specification. For example:

f = """
test: 'this is a single quoted 
      string'"""
YAML.load(f)

returns

Dict{Any, Any} with 1 entry:
  "test" => "this is a single quoted\nstring"

instead of

Dict{Any, Any} with 1 entry:
  "test" => "this is a single quoted string"

Version info:

Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin22.4.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, westmere)
  Threads: 1 on 10 virtual cores

using YAML v0.4.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions