Skip to content
  • ash's avatar
    userdiff: support Markdown · 09dad925
    ash authored and Junio C Hamano's avatar Junio C Hamano committed
    It's typical to find Markdown documentation alongside source code, and
    having better context for documentation changes is useful; see also
    commit 69f9c87d (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: default avatarAsh Holland <ash@sorrel.sh>
    Acked-by: default avatarJohannes Sixt <j6t@kdbg.org>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    09dad925