Commit graph

8 commits

Author SHA1 Message Date
Anthony Sottile
f138e3451b Update hooks 2015-05-31 13:51:02 -07:00
Alexander Dupuy
a6023ac0d7 Implement Markdown trailing space line break preservation
Markdown uses two or more trailing spaces on a line to indicate a forced
line break `<br/>` - these will be preserved for files with a markdown
extension (default = `.md` or `.markdown`).

Add `--markdown-linebreak-ext=X,Y` to add extensions (`*` matches any),
and `--no-markdown-linebreak-ext` to disable this feature.

If you want to set specific extension `foo` only (and not md/markdown),
use `--no-markdown-linebreak-ext --markdown-linebreak-ext=foo`

Tries to prevent --markdown-linebreak-ext from eating filenames as if they were
extensions by rejecting any with '.' or '/' (or even Windows-style '\' or ':')

Update README.md to include information on these arguments as well as
arguments added to other hooks

Add extensive tests using pytest.mark.parametrize

test that `txt` file is not considered as 'txt' extension
test that `.txt` file is not considered as 'txt' extension

The latter is the (correct) behavior of os.path.splitext(), and an example
of why it is better to use the libraries than to mangle strings yourself.
2015-05-11 08:52:32 +02:00
Anthony Sottile
713fab4bc7 Remove dependency on plumbum 2015-03-20 14:15:30 -07:00
Anthony Sottile
2f1d2bbe5b Remove @entry decorator (and misc cleanup) 2015-01-04 11:08:53 -08:00
Anthony Sottile
00d5904b80 Fix pylint. 2014-06-01 16:08:31 -07:00
Anthony Sottile
ba80c884f8 Fix PyPy 2014-04-13 22:53:54 -07:00
Anthony Sottile
8328f8f518 Fix Python2.6 coverage. 2014-04-13 22:31:47 -07:00
Anthony Sottile
8270d81308 Improve test coverage. 2014-04-13 22:21:42 -07:00