Skip to content

parser: treat even trailing backslashes as literal - #405

Closed
team-humaki wants to merge 1 commit into
go-ini:v1from
team-humaki:parser-even-trailing-backslash-not-continuation
Closed

team-humaki wants to merge 1 commit into
go-ini:v1from
team-humaki:parser-even-trailing-backslash-not-continuation

Conversation

@team-humaki

Copy link
Copy Markdown

A value that ends with an even number of backslashes (Windows paths such as Y:\\_1\\) was treated as a line continuation, so the next key was glued onto the value.

Only an odd trailing-backslash count continues onto the next line; even counts stay literal. Existing odd-count continuation (a\b\) is unchanged.

Fixes #347

unknwon commented Nov 11, 2026

Copy link
Copy Markdown
Member

Thanks. This changes values that valid files load today, e.g., k = C:\dir\\ at the end of a section reads as C:\dir\ now and would become C:\dir\\. IgnoreContinuation: true already reads such paths literally, so I'd rather not change the default on v1.

@unknwon unknwon closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error parse values

2 participants