-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Error parsing INI section names with spaces #16206
Labels
Comments
Looks like a bug Could you provide your program? |
ringabout
added a commit
to ringabout/Nim
that referenced
this issue
Dec 1, 2020
Merged
@xflywind here is the program, but this is just a copy from the documentation, see the link in OP import os, parsecfg, strutils, streams
var f = newFileStream(paramStr(1), fmRead)
if f != nil:
var p: CfgParser
open(p, f, paramStr(1))
while true:
var e = next(p)
case e.kind
of cfgEof: break
of cfgSectionStart: ## a ``[section]`` has been parsed
echo("new section: " & e.section)
of cfgKeyValuePair:
echo("key-value-pair: " & e.key & ": " & e.value)
of cfgOption:
echo("command: " & e.key & ": " & e.value)
of cfgError:
echo(e.msg)
close(p)
else:
echo("cannot open: " & paramStr(1)) |
ringabout
added a commit
to ringabout/Nim
that referenced
this issue
Dec 3, 2020
This reverts commit c399cc2.
timotheecour
added a commit
that referenced
this issue
Jan 2, 2021
mildred
pushed a commit
to mildred/Nim
that referenced
this issue
Jan 11, 2021
* try to fix nim-lang#16206 * merge two parsecfg tests into one * Revert "fix" This reverts commit 668bdec. * Revert "try to fix nim-lang#16206" This reverts commit c399cc2.
mildred
pushed a commit
to mildred/Nim
that referenced
this issue
Jan 11, 2021
* better docs and tests * a bit better only clean trailing whitespace
mildred
pushed a commit
to mildred/Nim
that referenced
this issue
Jan 11, 2021
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
* try to fix nim-lang#16206 * merge two parsecfg tests into one * Revert "fix" This reverts commit 668bdec. * Revert "try to fix nim-lang#16206" This reverts commit c399cc2.
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
* better docs and tests * a bit better only clean trailing whitespace
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was trying out the example program from the documentation for parsing INI files. If the section name contains spaces, it would parse the INI file incorrectly.
Example INI file
Current Output
Expected Output
Possible Solution
Additional Information
The text was updated successfully, but these errors were encountered: