Add options for not doing Windows-specific rules, not truncating#45
Add options for not doing Windows-specific rules, not truncating#45flotwig wants to merge 2 commits intoparshap:masterfrom
Conversation
|
Hi @flotwig, thanks for picking this up. I think a nicer way to add this functionality is adding a |
|
That sounds good. So I make sure I get this right, the |
|
Hmm, I'm actually not sure that |
|
Also, @parshap, is the 255 max-length a thing on all platforms? |
|
I was wrong, it is 255 but includes the filename extension (means |
I wanted to use this in the context of a web application which saves files on a GitHub repo (flotwig/markdown-notebooks) so I didn't need or want the parts that applied only to Windows filenames. So, I added an option to disable the last 2 regexes that are applied that are Windows-specific.
I also added an option to disable truncation, just for the sake of having some more options. :)
I added unit tests for the new functionality along with a switch for
test.jsto just run the unit tests. All tests pass, and this doesn't change the behavior the exposed API or the internalsanitizeAPI for existing users.