summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-08 21:25:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-08 21:25:01 (GMT)
commitdc4c3933b189f7c3087008d3dc2b16ef8325ab1b (patch)
tree9cba243af9814d38e4db9726679d4df86f4718f8 /t
parent933fdf8784d0fedaa259c6caf90115cfa7d21184 (diff)
parent09dad9256a32affc4a3bc0cf1fa45d5fa6f51231 (diff)
downloadgit-dc4c3933b189f7c3087008d3dc2b16ef8325ab1b.zip
git-dc4c3933b189f7c3087008d3dc2b16ef8325ab1b.tar.gz
git-dc4c3933b189f7c3087008d3dc2b16ef8325ab1b.tar.bz2
Merge branch 'ah/userdiff-markdown'
The userdiff patterns for Markdown documents have been added. * ah/userdiff-markdown: userdiff: support Markdown
Diffstat (limited to 't')
-rwxr-xr-xt/t4018-diff-funcname.sh1
-rw-r--r--t/t4018/markdown-heading-indented6
-rw-r--r--t/t4018/markdown-heading-non-headings17
3 files changed, 24 insertions, 0 deletions
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 02255a0..9d07797 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -38,6 +38,7 @@ diffpatterns="
golang
html
java
+ markdown
matlab
objc
pascal
diff --git a/t/t4018/markdown-heading-indented b/t/t4018/markdown-heading-indented
new file mode 100644
index 0000000..1991c2b
--- /dev/null
+++ b/t/t4018/markdown-heading-indented
@@ -0,0 +1,6 @@
+Indented headings are allowed, as long as the indent is no more than 3 spaces.
+
+ ### RIGHT
+
+- something
+- ChangeMe
diff --git a/t/t4018/markdown-heading-non-headings b/t/t4018/markdown-heading-non-headings
new file mode 100644
index 0000000..c479c1a
--- /dev/null
+++ b/t/t4018/markdown-heading-non-headings
@@ -0,0 +1,17 @@
+Headings can be right next to other lines of the file:
+# RIGHT
+Indents of four or more spaces make a code block:
+
+ # code comment, not heading
+
+If there's no space after the final hash, it's not a heading:
+
+#hashtag
+
+Sequences of more than 6 hashes don't make a heading:
+
+####### over-enthusiastic heading
+
+So the detected heading should be right up at the start of this file.
+
+ChangeMe