Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Use re.MULTILINE instead of re.DOTALL #80

Closed
wants to merge 1 commit into from

Conversation

snickl
Copy link
Contributor

@snickl snickl commented Sep 11, 2016

Not sure which use cases this change breaks, but I found I need the
other mode to also catch trailing newlines when removing rcsids from
old C code with this invocation: codemod -m '^.+?RCSID.+?$\n*'

Or maybe we could add a command line option to choose the multiple line mode?

Not sure which use cases this change breaks, but I found I need the
other mode to also catch trailing newlines when removing rcsids from
old C code with this invocation: codemod -m '^.+?RCSID.+?$\n*' ''
@ghost ghost added the CLA Signed label Sep 11, 2016
@modocache
Copy link
Contributor

Thanks! A command-line option (with the current behavior as the default) sounds like it might be best.

@snickl
Copy link
Contributor Author

snickl commented Sep 18, 2016

Hey there! I found that it is more complicated, MULTILINE and DOTALL do different things and can even be combined. Plus there is a comment in the code that says that the multiline suggestor is "hacky and should be rewritten". I can only imagine it to be quite tricky, given the lack of a simple notion what a chunk is. Not sure if you could run this by the original author, at the moment I have no good idea how to do this cleanly and will therefore close this PR for the time being.

@snickl snickl closed this Sep 18, 2016
@modocache
Copy link
Contributor

OK, that sounds reasonable. Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants