diff --git a/src/main/java/io/github/gitbucket/markedj/Grammer.java b/src/main/java/io/github/gitbucket/markedj/Grammer.java
index 2c33b2b..bceae35 100644
--- a/src/main/java/io/github/gitbucket/markedj/Grammer.java
+++ b/src/main/java/io/github/gitbucket/markedj/Grammer.java
@@ -12,7 +12,7 @@ public class Grammer {
public static String BULLET = "(?:[*+-]|\\d+\\.)";
public static String COMMENT = "";
- public static String TAG = "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";
+ public static String TAG = "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b|details|summary)\\w+(?!:/|[^\\w\\s@]*@)\\b";
public static String CLOSED = "<(" + TAG + ")[\\s\\S]+?<\\/\\1>";
public static String CLOSING = "<" + TAG + "(?:\"[^\"]*\"|'[^']*'|[^'\">])*?>";
public static String HR = "\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))";
diff --git a/src/test/java/io/github/gitbucket/markedj/MarkedTest.java b/src/test/java/io/github/gitbucket/markedj/MarkedTest.java
index a6ce24c..de56ed0 100644
--- a/src/test/java/io/github/gitbucket/markedj/MarkedTest.java
+++ b/src/test/java/io/github/gitbucket/markedj/MarkedTest.java
@@ -204,6 +204,22 @@ public void testEmptyTableCell() throws Exception {
"\n", result);
}
+ @Test
+ public void testDetailsTag() throws Exception {
+ String result = Marked.marked(
+ "sample title
\n" +
+ "long long text\n" +
+ "
sample title
\n" +
+ "long long text\n" +
+ "