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

fix adjacent quotation marks marshaling in multiline string #365

Merged

Conversation

AllenX2018
Copy link
Contributor

From the spec:

str5 = """Here are three quotation marks: ""\"."""
str6 = """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""

The adjacent quotation marks which make the multiline string closed early should be escaped when marshaling.

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #365 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #365      +/-   ##
==========================================
+ Coverage   94.98%   95.00%   +0.02%     
==========================================
  Files          10       10              
  Lines        2112     2121       +9     
==========================================
+ Hits         2006     2015       +9     
  Misses         65       65              
  Partials       41       41              
Impacted Files Coverage Δ
tomltree_write.go 95.51% <100.00%> (+0.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 323fe5d...72a2e13. Read the comment docs.

@pelletier
Copy link
Owner

Good catch, thanks for the patch!

@pelletier pelletier merged commit a30fd22 into pelletier:master Apr 25, 2020
@pelletier pelletier added spec Issues related to the implementation of a new version of the TOML spec. bug Issues describing a bug in go-toml. labels Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues describing a bug in go-toml. spec Issues related to the implementation of a new version of the TOML spec.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants