pre-commit-hooks/pre_commit_hooks
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
..
__init__.py Initial commit. 2014-03-13 08:41:35 -07:00
autopep8_wrapper.py Respect autopep8 config. Resolves #38. 2015-02-26 18:23:52 -08:00
check_added_large_files.py Add check_case_conflict hook #21 2015-01-12 15:38:22 -08:00
check_case_conflict.py Remove dependency on plumbum 2015-03-20 14:15:30 -07:00
check_docstring_first.py Add check-docstring-first hook. 2015-01-04 13:06:21 -08:00
check_json.py Update pre-commit hooks 2015-01-04 16:05:54 -08:00
check_merge_conflict.py Refactor check-merge-conflicts tests 2015-05-09 04:29:38 +02:00
check_xml.py Add check-xml hook. 2015-01-17 10:30:58 -08:00
check_yaml.py Use the CLoader when present to validate yaml 2015-01-15 09:44:48 -08:00
debug_statement_hook.py Add q as a debug statement 2015-04-10 10:55:33 -07:00
detect_private_key.py Implement Markdown trailing space line break preservation 2015-05-11 08:52:32 +02:00
end_of_file_fixer.py Fix end-of-file-fixer on windows 2015-01-19 16:43:10 -08:00
requirements_txt_fixer.py More naturally sort requirements. 2015-02-12 09:30:17 -08:00
string_fixer.py Use the tokenizer for great success 2015-02-10 08:17:35 -08:00
tests_should_end_in_test.py Add --django flag to test name checker 2015-03-11 17:44:59 -07:00
trailing_whitespace_fixer.py Implement Markdown trailing space line break preservation 2015-05-11 08:52:32 +02:00
util.py Remove dependency on plumbum 2015-03-20 14:15:30 -07:00