diff --git a/autotests/folding/test.srt.fold b/autotests/folding/test.srt.fold
new file mode 100644
--- /dev/null
+++ b/autotests/folding/test.srt.fold
@@ -0,0 +1,56 @@
+1
+00:02:17,440 --> 00:02:20,375
+Senator, we're making
+our final approach into Coruscant.
+
+2
+00:02:20,476 --> 00:02:22,501
+Very good, Lieutenant.
+
+3
+00:03:23,412 --> 00:05:12,431
+bold normal {b}bold{/b}
+italic normal {i}italic{/i}
+underline normal {u}underline{/u}
+strikethrough normal {s}strikethrough{/s}
+ text
+
+4
+00:06:52,412 --> 00:07:13,111
+{\an6} {\hello} {Y:hello}
+
+5
+00:08:52,412 --> 00:10:13,111 X1:000 X2:000 Y1:050 Y2:100
+Let us have some! Let us have some!
+
+6
+00:12:32,143 --> 00:13:58,562
+ bold bold-italic bold normal
+ bold bold-italic italic normal
+ italic bold-italic italic normal
+ italic bold-italic bold normal
+normal
+{b} bold {i} bold-italic {/i} bold {/b} normal
+{b} bold {i} bold-italic {/b} italic {/i} normal
+{i} italic {b} bold-italic {/b} italic {/i} normal
+{i} italic {b} bold-italic {/i} bold {/b} normal
+normal
+ underline bold-underline underline normal
+ underline bold-underline bold normal
+ underline italic-underline underline normal
+ underline italic-underline italic normal
+normal
+{u} underline {b} bold-underline {/b} underline {/u} normal
+{u} underline {b} bold-underline {/u} bold {/b} normal
+{u} underline {i} italic-underline {/i} underline {/u} normal
+{u} underline {i} italic-underline {/u} italic {/i} normal
+normal
+ bold bold-underline bold normal
+ bold bold-underline underline normal
+ italic italic-underline italic normal
+ italic italic-underline underline normal
+normal
+{b} bold {u} bold-underline {/u} bold {/b} normal
+{b} bold {u} bold-underline {/b} underline {/u} normal
+{i} italic {u} italic-underline {/u} italic {/i} normal
+{i} italic {u} italic-underline {/i} underline {/u} normal
diff --git a/autotests/html/test.srt.html b/autotests/html/test.srt.html
new file mode 100644
--- /dev/null
+++ b/autotests/html/test.srt.html
@@ -0,0 +1,63 @@
+
+
+
+test.srt
+
+
+1
+00:02:17,440 --> 00:02:20,375
+Senator, we're making
+our final approach into Coruscant.
+
+2
+00:02:20,476 --> 00:02:22,501
+Very good, Lieutenant.
+
+3
+00:03:23,412 --> 00:05:12,431
+<b>bold</b> normal {b}bold{/b}
+<i>italic</i> normal {i}italic{/i}
+<u>underline</u> normal {u}underline{/u}
+<s>strikethrough</s> normal {s}strikethrough{/s}
+<font color="color name or #code"> text </font>
+
+4
+00:06:52,412 --> 00:07:13,111
+{\an6} {\hello} {Y:hello}
+
+5
+00:08:52,412 --> 00:10:13,111 X1:000 X2:000 Y1:050 Y2:100
+Let us have some! Let us have some!
+
+6
+00:12:32,143 --> 00:13:58,562
+<b> bold <i> bold-italic </i> bold </b> normal
+<b> bold <i> bold-italic </b> italic </i> normal
+<i> italic <b> bold-italic </b> italic </i> normal
+<i> italic <b> bold-italic </i> bold </b> normal
+normal
+{b} bold {i} bold-italic {/i} bold {/b} normal
+{b} bold {i} bold-italic {/b} italic {/i} normal
+{i} italic {b} bold-italic {/b} italic {/i} normal
+{i} italic {b} bold-italic {/i} bold {/b} normal
+normal
+<u> underline <b> bold-underline </b> underline </u> normal
+<u> underline <b> bold-underline </u> bold </b> normal
+<u> underline <i> italic-underline </i> underline </u> normal
+<u> underline <i> italic-underline </u> italic </i> normal
+normal
+{u} underline {b} bold-underline {/b} underline {/u} normal
+{u} underline {b} bold-underline {/u} bold {/b} normal
+{u} underline {i} italic-underline {/i} underline {/u} normal
+{u} underline {i} italic-underline {/u} italic {/i} normal
+normal
+<b> bold <u> bold-underline </u> bold </b> normal
+<b> bold <u> bold-underline </b> underline </u> normal
+<i> italic <u> italic-underline </u> italic </i> normal
+<i> italic <u> italic-underline </i> underline </u> normal
+normal
+{b} bold {u} bold-underline {/u} bold {/b} normal
+{b} bold {u} bold-underline {/b} underline {/u} normal
+{i} italic {u} italic-underline {/u} italic {/i} normal
+{i} italic {u} italic-underline {/i} underline {/u} normal
+
diff --git a/autotests/input/test.srt b/autotests/input/test.srt
new file mode 100644
--- /dev/null
+++ b/autotests/input/test.srt
@@ -0,0 +1,56 @@
+1
+00:02:17,440 --> 00:02:20,375
+Senator, we're making
+our final approach into Coruscant.
+
+2
+00:02:20,476 --> 00:02:22,501
+Very good, Lieutenant.
+
+3
+00:03:23,412 --> 00:05:12,431
+bold normal {b}bold{/b}
+italic normal {i}italic{/i}
+underline normal {u}underline{/u}
+strikethrough normal {s}strikethrough{/s}
+ text
+
+4
+00:06:52,412 --> 00:07:13,111
+{\an6} {\hello} {Y:hello}
+
+5
+00:08:52,412 --> 00:10:13,111 X1:000 X2:000 Y1:050 Y2:100
+Let us have some! Let us have some!
+
+6
+00:12:32,143 --> 00:13:58,562
+ bold bold-italic bold normal
+ bold bold-italic italic normal
+ italic bold-italic italic normal
+ italic bold-italic bold normal
+normal
+{b} bold {i} bold-italic {/i} bold {/b} normal
+{b} bold {i} bold-italic {/b} italic {/i} normal
+{i} italic {b} bold-italic {/b} italic {/i} normal
+{i} italic {b} bold-italic {/i} bold {/b} normal
+normal
+ underline bold-underline underline normal
+ underline bold-underline bold normal
+ underline italic-underline underline normal
+ underline italic-underline italic normal
+normal
+{u} underline {b} bold-underline {/b} underline {/u} normal
+{u} underline {b} bold-underline {/u} bold {/b} normal
+{u} underline {i} italic-underline {/i} underline {/u} normal
+{u} underline {i} italic-underline {/u} italic {/i} normal
+normal
+ bold bold-underline bold normal
+ bold bold-underline underline normal
+ italic italic-underline italic normal
+ italic italic-underline underline normal
+normal
+{b} bold {u} bold-underline {/u} bold {/b} normal
+{b} bold {u} bold-underline {/b} underline {/u} normal
+{i} italic {u} italic-underline {/u} italic {/i} normal
+{i} italic {u} italic-underline {/i} underline {/u} normal
diff --git a/autotests/reference/test.srt.ref b/autotests/reference/test.srt.ref
new file mode 100644
--- /dev/null
+++ b/autotests/reference/test.srt.ref
@@ -0,0 +1,56 @@
+1
+00:02:17,440 00:02:20,375
+Senator, we're making
+our final approach into Coruscant.
+
+2
+00:02:20,476 00:02:22,501
+Very good, Lieutenant.
+
+3
+00:03:23,412 00:05:12,431
+bold normal {b}bold{/b}
+italic normal {i}italic{/i}
+underline normal {u}underline{/u}
+strikethrough normal {s}strikethrough{/s}
+ color="color name or #code"> text
+
+4
+00:06:52,412 00:07:13,111
+{\an6} {\hello} {Y:hello}
+
+5
+00:08:52,412 00:10:13,111 X1:000 X2:000 Y1:050 Y2:100
+Let us have some! Let us have some!
+
+6
+00:12:32,143 00:13:58,562
+ bold bold-italic bold normal
+ bold bold-italic italic normal
+ italic bold-italic italic normal
+ italic bold-italic bold normal
+normal
+{b} bold {i} bold-italic {/i} bold {/b} normal
+{b} bold {i} bold-italic {/b} italic {/i} normal
+{i} italic {b} bold-italic {/b} italic {/i} normal
+{i} italic {b} bold-italic {/i} bold {/b} normal
+normal
+ underline bold-underline underline normal
+ underline bold-underline bold normal
+ underline italic-underline underline normal
+ underline italic-underline italic normal
+normal
+{u} underline {b} bold-underline {/b} underline {/u} normal
+{u} underline {b} bold-underline {/u} bold {/b} normal
+{u} underline {i} italic-underline {/i} underline {/u} normal
+{u} underline {i} italic-underline {/u} italic {/i} normal
+normal
+ bold bold-underline bold normal
+ bold bold-underline underline normal
+ italic italic-underline italic normal
+ italic italic-underline underline normal
+normal
+{b} bold {u} bold-underline {/u} bold {/b} normal
+{b} bold {u} bold-underline {/b} underline {/u} normal
+{i} italic {u} italic-underline {/u} italic {/i} normal
+{i} italic {u} italic-underline {/i} underline {/u} normal
diff --git a/data/syntax/html.xml b/data/syntax/html.xml
--- a/data/syntax/html.xml
+++ b/data/syntax/html.xml
@@ -5,7 +5,7 @@
]>
-
+
@@ -20,8 +20,19 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -54,8 +65,6 @@
-
-
@@ -230,7 +239,7 @@
-
+
diff --git a/data/syntax/markdown.xml b/data/syntax/markdown.xml
--- a/data/syntax/markdown.xml
+++ b/data/syntax/markdown.xml
@@ -88,7 +88,7 @@
]>
-
+
@@ -502,12 +502,8 @@
-
-
-
-
-
+
+
diff --git a/data/syntax/mustache.xml b/data/syntax/mustache.xml
--- a/data/syntax/mustache.xml
+++ b/data/syntax/mustache.xml
@@ -41,7 +41,7 @@
* v1 [2019-02-10]: Initial version
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -200,21 +200,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/syntax/subrip-subtitles.xml b/data/syntax/subrip-subtitles.xml
new file mode 100644
--- /dev/null
+++ b/data/syntax/subrip-subtitles.xml
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+