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

Add option for formfeed characters #17

Open
ian-kelling opened this issue Aug 12, 2019 · 3 comments
Open

Add option for formfeed characters #17

ian-kelling opened this issue Aug 12, 2019 · 3 comments

Comments

@ian-kelling
Copy link
Contributor

Currently, they are deleted by default as whitespace at the end of the line.
I think they should not be removed by default, and maybe an option
added to remove them. They are part of many gnu programs that
have very very widespread use:
https://www.gnu.org/prep/standards/standards.html#index-formfeed
These characters are also known as ctrl-L ^L, ascii character #12

@ian-kelling
Copy link
Contributor Author

Note, these characters do not show up "as whitespace" in emacs or vim, they show
as ^L. So, for code, I don't even consider them to be whitespace.
The reason they are considered whitespace by regex is because they are whitespace for purposes of printing physical copies. But in that circumstance, they are always
significant whitespace, you would never want to delete them.

@ian-kelling
Copy link
Contributor Author

*would not want a general rule to always delete them.

@dlenski
Copy link
Owner

dlenski commented Jan 31, 2020

Interesting 🤔

Perhaps we need a way to customize which characters get considered as whitespace/non-whitespace (rather than just relying on \s and \S) in the main regex…?

Want to code something up and submit a PR?

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

No branches or pull requests

2 participants