diff options
author | Ash Holland <ash@sorrel.sh> | 2020-05-02 14:15:43 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-02 18:04:12 -0700 |
commit | 09dad9256a32affc4a3bc0cf1fa45d5fa6f51231 (patch) | |
tree | 077894ab6bd3dc84f7c030d2aec50c0847311d61 /Documentation/gitattributes.txt | |
parent | The third batch (diff) | |
download | tgif-09dad9256a32affc4a3bc0cf1fa45d5fa6f51231.tar.xz |
userdiff: support Markdown
It's typical to find Markdown documentation alongside source code, and
having better context for documentation changes is useful; see also
commit 69f9c87d4 (userdiff: add support for Fountain documents,
2015-07-21).
The pattern is based on the CommonMark specification 0.29, section 4.2
<https://spec.commonmark.org/> but doesn't match empty headings, as
seeing them in a hunk header is unlikely to be useful.
Only ATX headings are supported, as detecting setext headings would
require printing the line before a pattern matches, or matching a
multiline pattern. The word-diff pattern is the same as the pattern for
HTML, because many Markdown parsers accept inline HTML.
Signed-off-by: Ash Holland <ash@sorrel.sh>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitattributes.txt')
-rw-r--r-- | Documentation/gitattributes.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index 508fe713c4..2d0a03715b 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -824,6 +824,8 @@ patterns are available: - `java` suitable for source code in the Java language. +- `markdown` suitable for Markdown documents. + - `matlab` suitable for source code in the MATLAB and Octave languages. - `objc` suitable for source code in the Objective-C language. |