handle parenthesis tokens in markdown
diff --git a/src/Kotlin/ContentBuilder.kt b/src/Kotlin/ContentBuilder.kt
index 80d49a8..42a2d99 100644
--- a/src/Kotlin/ContentBuilder.kt
+++ b/src/Kotlin/ContentBuilder.kt
@@ -105,7 +105,9 @@
}
MarkdownTokenTypes.DOUBLE_QUOTE,
MarkdownTokenTypes.LT,
- MarkdownTokenTypes.GT -> {
+ MarkdownTokenTypes.GT,
+ MarkdownTokenTypes.LPAREN,
+ MarkdownTokenTypes.RPAREN -> {
parent.append(ContentText(node.text))
}
else -> {
diff --git a/test/data/format/parenthesis.html b/test/data/format/parenthesis.html
new file mode 100644
index 0000000..9e73944
--- /dev/null
+++ b/test/data/format/parenthesis.html
@@ -0,0 +1,13 @@
+<HTML>
+<HEAD>
+<title>test / foo</title>
+</HEAD>
+<BODY>
+<a href="out.html">test</a> / <a href="out.html"></a> / <a href="out.html">foo</a><br/>
+<br/>
+<h1>foo</h1>
+<pre><code><span class="keyword">fun </span><span class="identifier">foo</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></pre><p>foo (bar)</p>
+<br/>
+<br/>
+</BODY>
+</HTML>
diff --git a/test/data/format/parenthesis.kt b/test/data/format/parenthesis.kt
new file mode 100644
index 0000000..b906f64
--- /dev/null
+++ b/test/data/format/parenthesis.kt
@@ -0,0 +1,4 @@
+/**
+ * foo (bar)
+ */
+fun foo() {}
diff --git a/test/src/format/HtmlFormatTest.kt b/test/src/format/HtmlFormatTest.kt
index 0170d14..251c707 100644
--- a/test/src/format/HtmlFormatTest.kt
+++ b/test/src/format/HtmlFormatTest.kt
@@ -45,4 +45,10 @@
htmlService.appendNodes(tempLocation, output, model.members.single().members)
}
}
+
+ Test fun parenthesis() {
+ verifyOutput("test/data/format/parenthesis.kt", ".html") { model, output ->
+ htmlService.appendNodes(tempLocation, output, model.members.single().members)
+ }
+ }
}