Skip to content

fix: only strip inline # comment when preceded by whitespace in mpv.conf parser - #788

Open
Bolt4243 wants to merge 1 commit into
mpvnet-player:mainfrom
Bolt4243:fix/conf-hash-truncation
Open

fix: only strip inline # comment when preceded by whitespace in mpv.conf parser#788
Bolt4243 wants to merge 1 commit into
mpvnet-player:mainfrom
Bolt4243:fix/conf-hash-truncation

Conversation

@Bolt4243

Copy link
Copy Markdown

The conf parser in Player.Conf stripped everything from the first # onward whenever a value contained # but did not start with it. This corrupted legitimate values such as script-opts=key=val#suffix or color hex codes.

mpv's own conf syntax treats # as a comment only when preceded by whitespace. Changed the check to look for " #" (space then hash) so embedded # characters in values are preserved.

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.

1 participant