mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:10:43 +07:00
WEB-60601 Support Next.js 13+ App directory for href links
WEB-67556 Support for special path resolving for frameworks with file system-based routing GitOrigin-RevId: 91f2839b1a20173eef34c4524b9c41e820782e66
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b038d3db65
commit
a32fd0c588
@@ -107,10 +107,12 @@ public final class HtmlReferenceProvider extends PsiReferenceProvider {
|
||||
) ||
|
||||
( attrName.equalsIgnoreCase(HREF_ATTRIBUTE_NAME) &&
|
||||
( tagName.equalsIgnoreCase("a") ||
|
||||
tagName.equalsIgnoreCase("area") ||
|
||||
tagName.equalsIgnoreCase("link")
|
||||
tagName.equalsIgnoreCase("area") ||
|
||||
StringUtil.endsWithIgnoreCase(tagName, "link")
|
||||
)
|
||||
) ||
|
||||
) ||
|
||||
(attrName.equalsIgnoreCase("to") && StringUtil.endsWithIgnoreCase(tagName, "link")
|
||||
) ||
|
||||
( attrName.equalsIgnoreCase(USEMAP_ATTR_NAME) &&
|
||||
(tagName.equalsIgnoreCase(SizeReference.IMAGE_TAG_NAME) ||
|
||||
tagName.equalsIgnoreCase("object"))
|
||||
@@ -248,7 +250,8 @@ public final class HtmlReferenceProvider extends PsiReferenceProvider {
|
||||
("poster".equals(localName) && "video".equalsIgnoreCase(tag.getName()))) {
|
||||
refs = PathReferenceManager.getInstance().createReferences(element, false, false, true);
|
||||
}
|
||||
else if (HREF_ATTRIBUTE_NAME.equalsIgnoreCase(localName) && "link".equalsIgnoreCase(tag.getName())) {
|
||||
else if ((HREF_ATTRIBUTE_NAME.equalsIgnoreCase(localName) || "to".equalsIgnoreCase(localName)) &&
|
||||
(StringUtil.endsWithIgnoreCase(tag.getName(), "link"))) {
|
||||
if (!HtmlUtil.hasHtmlPrefix(text)) {
|
||||
FileType[] fileTypes = findFileTypeByRel(tag.getAttributeValue("rel"));
|
||||
String typeValue = tag.getAttributeValue("type");
|
||||
@@ -296,7 +299,7 @@ public final class HtmlReferenceProvider extends PsiReferenceProvider {
|
||||
public static String[] getAttributeValues() {
|
||||
return new String[] {SRC_ATTR_NAME, HREF_ATTRIBUTE_NAME, USEMAP_ATTR_NAME, "action", "background", "width", "height", "type", "bgcolor", "color", "vlink",
|
||||
"link", "alink", "text", "name", HtmlUtil.ID_ATTRIBUTE_NAME, HtmlUtil.CLASS_ATTRIBUTE_NAME, FOR_ATTR_NAME, MicrodataUtil.ITEM_REF, "data", "poster", "srcset",
|
||||
LABELLEDBY
|
||||
LABELLEDBY, "to"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user