aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/lexers/email.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-01 22:59:31 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-01 22:59:31 +0300
commitd734f9904bbe0ba33dd86083e44d89cf2da3cbb2 (patch)
treefb5f38eab7b676520995c20b43ed1c9b4f7ef682 /lib/lexers/email.tes
parentc0cede661eb9362cce1b50642c4bae5faa7bd220 (diff)
downloadsciteco-d734f9904bbe0ba33dd86083e44d89cf2da3cbb2.tar.gz
implemented email and git lexer folding
Diffstat (limited to 'lib/lexers/email.tes')
-rw-r--r--lib/lexers/email.tes19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/lexers/email.tes b/lib/lexers/email.tes
index 895aeea..11dbcf7 100644
--- a/lib/lexers/email.tes
+++ b/lib/lexers/email.tes
@@ -21,14 +21,25 @@
ZJ [_-:S^J-- ^J]_"S !* signatures *!
4R .U.z
ESSTARTSTYLING 1,(:-)ESSETSTYLING
+
+ !* the signature is foldable *!
+ ESLINEFROMPOSITIONU.l
+ 1024#(2^*13),Q.lESSETFOLDLEVEL
+ <:L; 1025,%.lESSETFOLDLEVEL>
'
+ 0U.l
J< .-Q.z"= 1; '
- 0A->"= !* quotes *!
- U.s
- <:C; 0A- "N 1; '> .-Q.z"= 1; '
+ U.s
+ 0U.q <0A->"N1;' %.q <:C; 0A- "N 1; '>>
+
+ Q.q"> !* quotes *!
Q.sESSTARTSTYLING
- (0A->"=3|2'),(Q.lESLINELENGTH)ESSETSTYLING
+ (Q.q-1">3|2'),(Q.lESLINELENGTH)ESSETSTYLING
+
+ !* first line with higher quote level: will be the header *!
+ (Q.l-1ESGETLINESTATE)-Q.q"< (1024+Q.q-1)#(2^*13) | (1024+Q.q) ',Q.lESSETFOLDLEVEL
+ Q.q,Q.lESSETLINESTATE
'
:L; %.l>
]:}