Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect parsing of newlines within single quotes #241

Open
liamlundy opened this issue Nov 14, 2024 · 1 comment
Open

Incorrect parsing of newlines within single quotes #241

liamlundy opened this issue Nov 14, 2024 · 1 comment

Comments

@liamlundy
Copy link

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

@liamlundy
Copy link
Author

Additional YAML multiline info for reference: https://yaml-multiline.info/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants