mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 10:16:52 +00:00
Several markup formats, such as Markdown or Re(Structured)Text can format titles as text with '=' characters as double underlining, like this: ``` My Page Title ============= Lorem ipsum... ``` Rather that considering any line starting with seven '=' as a conflict marker, require a space (or line-ending newline) after the equals. This could still create a false positive for a seven character title, like "Problem", but the markup formats generally allow extra '=' characters, so by formatting the text like this: ``` Problem ======== Not... ``` these pre-commit warnings can be avoided. Also updates the tests to add newlines for more realistic conflict files (while a file might not end with a newline, conflict markers will). Prevent false negative on test_does_not_care_when_not_in_a_conflict() by making sure that README.md contains a line identical to a conflict string (exactly seven '=' followed by a newline). |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| autopep8_wrapper_test.py | ||
| check_added_large_files_test.py | ||
| check_case_conflict_test.py | ||
| check_docstring_first_test.py | ||
| check_json_test.py | ||
| check_merge_conflict_test.py | ||
| check_xml_test.py | ||
| check_yaml_test.py | ||
| conftest.py | ||
| debug_statement_hook_test.py | ||
| detect_private_key_test.py | ||
| end_of_file_fixer_test.py | ||
| readme_test.py | ||
| requirements_txt_fixer_test.py | ||
| string_fixer_test.py | ||
| tests_should_end_in_test_test.py | ||
| trailing_whitespace_fixer_test.py | ||
| util_test.py | ||