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

nimpretty destroys source with a source code filter #11532

disruptek opened this issue Jun 18, 2019 · 0 comments


Copy link

commented Jun 18, 2019

nimpretty replaces source code with unpretty garbage.


#? replace(sub = "\t", by = " ")
echo "Hello World!"

Current Output

replace(sub =  = ", by =  = )

Expected Output

#? replace(sub = "\t", by = " ")
echo "Hello World!"

Possible Solution

  • Remove support for source code filters and abort with a runtime error prior to overwriting the contents of the source file.

Additional Information

Nim Compiler Version 0.20.99 [Linux: amd64]
Compiled at 2019-06-18
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: 8ee0f14ab6b8decffe8673dac4d761c352d8e31d
active boot switches: -d:release

Apparently not fixed by #9384.

@narimiran narimiran added the nimpretty label Jun 19, 2019

@Araq Araq added the Regression label Jun 24, 2019

@Araq Araq closed this in f65eaa5 Jun 26, 2019

narimiran added a commit that referenced this issue Jun 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.