WEB-61273 Fix issues with std HTML tag inspections. Correctly recognize custom HTML tags with Web Symbols.

GitOrigin-RevId: edefcae50149532ffa05551eced308d246f8af03
This commit is contained in:
Piotr Tomiak
2023-07-04 18:07:41 +02:00
committed by intellij-monorepo-bot
parent 3d38ff22e1
commit bfc1e17a9f
7 changed files with 17 additions and 13 deletions

View File

@@ -1,15 +1,22 @@
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.xml;
import com.intellij.psi.xml.XmlTag;
/**
* Interface-marker for customization of behaviour "Custom Tag Name" highlighting
*/
public interface XmlCustomElementDescriptor {
/**
* @return true, if the element should be highlighted as "Custom Tag Name".
* For HTML files, there is also independent logic that checks that if no html tags with such name,
* then IDE will use "Custom tag name" highlighting
*/
boolean isCustomElement();
static boolean isCustomElement(XmlTag tag) {
return tag.getDescriptor() instanceof XmlCustomElementDescriptor descriptor
&& descriptor.isCustomElement();
}
}