How to navigate PsiElement in dart documents?

Answered
MarkdownElementTypes.SHORT_REFERENCE_LINK -> {
    if (node.text.startsWith("[") && node.text.endsWith("]")) {
        val r = node.text.removeSuffix("]").removePrefix("[")
        DocumentationManagerUtil.createHyperlink(sb, "link###$r", r, false, false)
    } else {
        sb.append(node.text)
    }
}

DocumentationManagerUtil.createHyperlink(sb, "link###$r", r, false, false), I used this function, and the generated HTML looks like this <a href="psi_element://link###State"><code>State</code></a> , It can be clicked, but it cannot display the corresponding document (No documentation found.), May I ask how to solve it?

0
1 comment

Are you trying to replace provided Dart documentation provider?
It seems the issue could be that getDocumentationElementForLink is not implemented in DartDocumentationProvider which is required to resolve such links to actual targets.

0

Please sign in to leave a comment.