KDoc link parsing rewrite.
Support qualified names immediately after tag (@see or @param). Detect whether a tag is followed by a reference immediately while lexing, remove TEXT_OR_LINK token type. Remove duplicate nested KDocLink nodes from the PSI structure.
This commit is contained in:
@@ -7,12 +7,11 @@ JetFile: Markdown.kt
|
||||
KDOC_SECTION
|
||||
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||
PsiElement(KDOC_TEXT)(' ')
|
||||
KDOC_LINK
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_NAME
|
||||
PsiElement(IDENTIFIER)('WikiLink')
|
||||
PsiElement(RBRACKET)(']')
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_NAME
|
||||
PsiElement(IDENTIFIER)('WikiLink')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||
PsiElement(KDOC_TEXT)(' ')
|
||||
@@ -21,12 +20,11 @@ JetFile: Markdown.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||
PsiElement(KDOC_TEXT)(' [')
|
||||
KDOC_LINK
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_NAME
|
||||
PsiElement(IDENTIFIER)('DoubleQuotedLink')
|
||||
PsiElement(RBRACKET)(']')
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_NAME
|
||||
PsiElement(IDENTIFIER)('DoubleQuotedLink')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiElement(KDOC_TEXT)(']')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||
|
||||
Reference in New Issue
Block a user