Skip to content

Commit c124017

Browse files
committed
Merge branch 'zb/userdiff-fountain'
New userdiff pattern definition for fountain screenwriting markup format. * zb/userdiff-fountain: userdiff: add support for Fountain documents
2 parents b6d323f + 69f9c87 commit c124017

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

Documentation/gitattributes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,8 @@ patterns are available:
527527

528528
- `fortran` suitable for source code in the Fortran language.
529529

530+
- `fountain` suitable for Fountain documents.
531+
530532
- `html` suitable for HTML/XHTML documents.
531533

532534
- `java` suitable for source code in the Java language.

t/t4018-diff-funcname.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ diffpatterns="
3131
cpp
3232
csharp
3333
fortran
34+
fountain
3435
html
3536
java
3637
matlab

t/t4018/fountain-scene

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
EXT. STREET RIGHT OUTSIDE - DAY
2+
3+
CHARACTER
4+
You didn't say the magic phrase, "ChangeMe".

userdiff.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ IPATTERN("fortran",
3535
* they would have been matched above as a variable anyway. */
3636
"|[-+]?[0-9.]+([AaIiDdEeFfLlTtXx][Ss]?[-+]?[0-9.]*)?(_[a-zA-Z0-9][a-zA-Z0-9_]*)?"
3737
"|//|\\*\\*|::|[/<>=]="),
38+
IPATTERN("fountain", "^((\\.[^.]|(int|ext|est|int\\.?/ext|i/e)[. ]).*)$",
39+
"[^ \t-]+"),
3840
PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$",
3941
"[^<>= \t]+"),
4042
PATTERNS("java",

0 commit comments

Comments
 (0)