1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-13 04:57:02 +02:00
git/t/t4018/markdown-heading-indented
Ash Holland 09dad9256a 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>
2020-05-02 18:04:12 -07:00

7 lines
117 B
Plaintext

Indented headings are allowed, as long as the indent is no more than 3 spaces.
### RIGHT
- something
- ChangeMe