          var child: PsiElement? = comment.firstChild
 -
 -        sb.append("<div class='content'>")
+-        val docStrBuilder = StringBuilder()
+-        val flushDocString = {
+-            sb.append(markdownToHtml(docStrBuilder.toString()))
+-            docStrBuilder.setLength(0)
+-        }
          while (child != null) {
-             when (child) {
--                is LuaDocClassDef -> renderClassDef(sb, child, tyRenderer)
--                is LuaDocTypeDef -> renderTypeDef(sb, child, tyRenderer)
--                is LuaDocFieldDef -> {}
--                is LuaDocSeeRefTag -> {}
--                is LuaDocParamDef -> {}
--                is LuaDocReturnDef -> {}
--                is LuaDocOverloadDef -> {}
+-            val elementType = child.node.elementType
+-            if (elementType == LuaDocTypes.STRING) {
+-                docStrBuilder.append(child.text)
+-                docStrBuilder.append("\n")
+-            } else {
+-                when (child) {
+-                    is LuaDocClassDef -> {
+-                        flushDocString()
+-                        renderClassDef(sb, child, tyRenderer)
++            when (child) {
 +                is LuaDocParamDef -> {
 +                    renderDocParam(sb, child)
 +                    sb.append("<br>")

     }
 }
-- 
2.17.0.windows.1


From 4dedba8cad54ad3a2451ea72f978057efb4c1fec Mon Sep 17 00:00:00 2001
From: tangzx <272669294@qq.com>
Date: Thu, 18 Oct 2018 09:46:26 +0800
Subject: [PATCH] Revert redesigned documentation

---
 .../tang/intellij/lua/documentation/DocRenderer.kt | 234 +++++++++------------
 .../lua/documentation/LuaDocumentationProvider.kt  | 108 +++++-----
 2 files changed, 147 insertions(+), 195 deletions(-)

diff --git a/src/main/java/com/tang/intellij/lua/documentation/DocRenderer.kt b/src/main/java/com/tang/intellij/lua/documentation/DocRenderer.kt
index 12fe5ef5..dc0db89f 100644
--- a/src/main/java/com/tang/intellij/lua/documentation/DocRenderer.kt
+++ b/src/main/java/com/tang/intellij/lua/documentation/DocRenderer.kt
@@ -20,209 +20,169 @@ import com.intellij.codeInsight.documentation.DocumentationManagerUtil
 import com.intellij.psi.PsiElement
 import com.tang.intellij.lua.comment.psi.*
 import com.tang.intellij.lua.comment.psi.api.LuaComment
