From cd6b80d6126a785c4407e118c13388db537d6bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 16 Apr 2022 21:21:08 +0800 Subject: split `doc.class` and `doc.type` --- script/parser/luadoc.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'script/parser') diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index 1d8d7c42..b46c81d9 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -1310,6 +1310,16 @@ local function isNextLine(binded, doc) return false end local lastDoc = binded[#binded] + if lastDoc.type == 'doc.type' then + return false + end + if lastDoc.type == 'doc.class' + or lastDoc.type == 'doc.field' then + if doc.type ~= 'doc.field' + and doc.type ~= 'doc.comment' then + return false + end + end local lastRow = guide.rowColOf(lastDoc.finish) local newRow = guide.rowColOf(doc.start) return newRow - lastRow == 1 -- cgit v1.2.3