From 64028eedb826a8a15612bf52ea54d3f554c8fce7 Mon Sep 17 00:00:00 2001 From: Ekopalypse <47723516+Ekopalypse@users.noreply.github.com> Date: Sat, 8 Jan 2022 18:16:32 +0100 Subject: [PATCH] toml: fix comment ends with crlf (#13097) --- vlib/toml/scanner/scanner.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/toml/scanner/scanner.v b/vlib/toml/scanner/scanner.v index 00613f08b4..e61e4a4db8 100644 --- a/vlib/toml/scanner/scanner.v +++ b/vlib/toml/scanner/scanner.v @@ -341,12 +341,12 @@ fn (mut s Scanner) ignore_line() ?string { util.printdbg(@MOD + '.' + @STRUCT + '.' + @FN, ' ignoring until EOL...') start := s.pos for c := s.at(); c != scanner.end_of_text && c != `\n`; c = s.at() { - s.next() util.printdbg(@MOD + '.' + @STRUCT + '.' + @FN, 'skipping "${byte(c).ascii_str()} / $c"') if s.at_crlf() { util.printdbg(@MOD + '.' + @STRUCT + '.' + @FN, 'letting `\\r\\n` slip through') break } + s.next() } return s.text[start..s.pos] }