diff --git a/tests/backslash_escapes.in.md b/tests/backslash_escapes.in.md
new file mode 100644
index 0000000..55fd035
--- /dev/null
+++ b/tests/backslash_escapes.in.md
@@ -0,0 +1,9 @@
+\*not emphasized*
+\
not a tag
+\[not a link](/foo)
+\`not code`
+\* not a list
+\# not a heading
+\[foo]: /url "not a reference"
+\ö not a character entity
+1\. not a list
diff --git a/tests/backslash_escapes.out.md b/tests/backslash_escapes.out.md
new file mode 100644
index 0000000..6be9dec
--- /dev/null
+++ b/tests/backslash_escapes.out.md
@@ -0,0 +1,9 @@
+\*not emphasized\*
+\
not a tag
+\[not a link\](/foo)
+\`not code\`
+\* not a list
+\# not a heading
+\[foo\]: /url "not a reference"
+\ö not a character entity
+1\. not a list
diff --git a/tests/it.rs b/tests/it.rs
index 4c6b350..b0d7e60 100644
--- a/tests/it.rs
+++ b/tests/it.rs
@@ -150,3 +150,10 @@ fn similar_heading_different_casing() {
fn tables_with_html() {
assert_toc!("tables_with_html");
}
+
+#[test]
+fn backslash_escapes() {
+ // Regression test #21
+ // Backslash-escaped elements should still be escaped.
+ assert_toc!("backslash_escapes");
+}