diff --git a/src/rules.js b/src/rules.js
index d3175e8ba0..a06bdb6892 100644
--- a/src/rules.js
+++ b/src/rules.js
@@ -21,9 +21,9 @@ const block = {
+ '|<\\?[\\s\\S]*?(?:\\?>\\n*|$)' // (3)
+ '|\\n*|$)' // (4)
+ '|\\n*|$)' // (5)
- + '|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)' // (6)
- + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag
- + '|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag
+ + '|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (6)
+ + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (7) open tag
+ + '|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (7) closing tag
+ ')',
def: /^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,
nptable: noopTest,
diff --git a/test/specs/new/indented_details.html b/test/specs/new/indented_details.html
new file mode 100644
index 0000000000..910ff957c1
--- /dev/null
+++ b/test/specs/new/indented_details.html
@@ -0,0 +1,24 @@
+Heading
+
## Heading
+## Heading
+## Heading
+## Heading
diff --git a/test/specs/new/indented_details.md b/test/specs/new/indented_details.md
new file mode 100644
index 0000000000..5b838ca17b
--- /dev/null
+++ b/test/specs/new/indented_details.md
@@ -0,0 +1,24 @@
+