1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 13:26:12 +02:00

userdiff: add support for Fountain documents

Add support for Fountain, a plain text screenplay format.  Git
facilitates not just programming specifically, but creative writing
in general, so it makes sense to also support other plain text
documents besides source code.

In the structure of a screenplay specifically, scenes are roughly
analogous to functions, in the sense that it makes your job easier
if you can see which ones were changed in a given range of patches.

More information about the Fountain format can be found on its
official website, at http://fountain.io .

Signed-off-by: Zoë Blade <zoe@bytenoise.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Zoë Blade 2015-07-21 14:22:46 +01:00 committed by Junio C Hamano
parent 7ecec52d42
commit 69f9c87d46
4 changed files with 9 additions and 0 deletions

View File

@ -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.

View File

@ -31,6 +31,7 @@ diffpatterns="
cpp
csharp
fortran
fountain
html
java
matlab

4
t/t4018/fountain-scene Normal file
View File

@ -0,0 +1,4 @@
EXT. STREET RIGHT OUTSIDE - DAY
CHARACTER
You didn't say the magic phrase, "ChangeMe".

View File

@ -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",