summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-03 11:01:29 -0700
committerJunio C Hamano <gitster@pobox.com>2015-08-03 11:01:29 -0700
commitc12401705c41a216e3ef777f6faaf192b974aabe (patch)
tree84f416c513ec96dbdfa5a968bc353b0bcd2ccb8e
parentb6d323f1646d7204fc6693071e5be84377ece70b (diff)
parent69f9c87d4654aad8011444727194c3053827ae07 (diff)
downloadgit-c12401705c41a216e3ef777f6faaf192b974aabe.tar.gz
Merge branch 'zb/userdiff-fountain'
New userdiff pattern definition for fountain screenwriting markup format. * zb/userdiff-fountain: userdiff: add support for Fountain documents
-rw-r--r--Documentation/gitattributes.txt2
-rwxr-xr-xt/t4018-diff-funcname.sh1
-rw-r--r--t/t4018/fountain-scene4
-rw-r--r--userdiff.c2
4 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 81fe586948..e3b1de8033 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -527,6 +527,8 @@ patterns are available:
- `fortran` suitable for source code in the Fortran language.
+- `fountain` suitable for Fountain documents.
+
- `html` suitable for HTML/XHTML documents.
- `java` suitable for source code in the Java language.
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 1dbaa3864a..67373dc44e 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -31,6 +31,7 @@ diffpatterns="
cpp
csharp
fortran
+ fountain
html
java
matlab
diff --git a/t/t4018/fountain-scene b/t/t4018/fountain-scene
new file mode 100644
index 0000000000..6b3257d680
--- /dev/null
+++ b/t/t4018/fountain-scene
@@ -0,0 +1,4 @@
+EXT. STREET RIGHT OUTSIDE - DAY
+
+CHARACTER
+You didn't say the magic phrase, "ChangeMe".
diff --git a/userdiff.c b/userdiff.c
index 2ccbee50cb..6bf2505994 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -35,6 +35,8 @@ IPATTERN("fortran",
* they would have been matched above as a variable anyway. */
"|[-+]?[0-9.]+([AaIiDdEeFfLlTtXx][Ss]?[-+]?[0-9.]*)?(_[a-zA-Z0-9][a-zA-Z0-9_]*)?"
"|//|\\*\\*|::|[/<>=]="),
+IPATTERN("fountain", "^((\\.[^.]|(int|ext|est|int\\.?/ext|i/e)[. ]).*)$",
+ "[^ \t-]+"),
PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$",
"[^<>= \t]+"),
PATTERNS("java",