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

--from does not accept pattern starting with # #7

Open
c-bb opened this issue Oct 5, 2015 · 1 comment
Open

--from does not accept pattern starting with # #7

c-bb opened this issue Oct 5, 2015 · 1 comment
Labels

Comments

@c-bb
Copy link
Contributor

c-bb commented Oct 5, 2015

$ repren --from '#include <a.h>' --to '#include <b.h>' .
error: found no parse patterns

Same with --literal:

$ repren --literal --from '#include <a.h>' --to '#include <b.h>' .
error: found no parse patterns

This is because it interprets the # as a comment character (in function parse_patterns()).

It would be nice if this comment logic did not apply when patterns are supplied directly via --from --to, and/or when --literal is given.

@c-bb c-bb changed the title --from does not accept pattern starting with --from does not accept pattern starting with # Oct 5, 2015
@jlevy jlevy added the bug label Oct 5, 2015
@jlevy
Copy link
Owner

jlevy commented Oct 5, 2015

Yeah, agreed. Feel free to submit a PR (with a test showing it working).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants