-
Notifications
You must be signed in to change notification settings - Fork 5
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
[bug] Sentence case should preserve sentences. #19
Comments
Ideal output is |
This is indeed an interesting behavior, that I hadn't considered. It is caused by the current way that stdrename renames inputs. Currently, stdrename's goals are to rename files first and maybe variables second. This means it parses inputs as though they were file names and splits off the extension before renaming them (this means it won't translate text after the first "." if there's no other "." after it like in your first example). This works fine for variable names as well, since you really shouldn't have "." in variable names in most programming languages. In the second example, it considers the file stem to include the first "." and the extension to be empty (from the last "." onward) as would be the case for an executable on Linux for example (although no "." is included in those cases). Thus, it translates the file stem and returns its translation as would be expected. However, since there's no extension to re-attach to it, stdrename "forgets" about the final "." in the process. Could you clarify what use case you would have for this? While this is unexpected behavior, I'd prefer to make sure there's actually a reason for "fixing" this before doing so and making stdrename's code more complex than it needs to be. |
This also highlights another problem:
|
-S
should preserve sentences.First case,
this is another...
should beThis is another...
.I'm not sure why having a dot at the end of the input results in all dots being removed in the second case.
The text was updated successfully, but these errors were encountered: