Skip to content

Commit

Permalink
DOCTYPE entities interfering with hover annotation display of tags /
Browse files Browse the repository at this point in the history
attributes.

Fixes redhat-developer/vscode-xml#716

Signed-off-by: azerr <[email protected]>
  • Loading branch information
angelozerr committed Jun 1, 2022
1 parent c0eec05 commit 3e580dc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public Collection<CMDocument> findCMDocument(DOMDocument xmlDocument, String nam
namespaceURI = xmlDocument.getNamespaceURI();
}
Collection<CMDocument> documents = new ArrayList<>();
boolean findByStandardAssociation = false;
for (ContentModelProvider modelProvider : modelProviders) {
// internal grammar
if (withInternal) {
Expand All @@ -152,12 +153,14 @@ public Collection<CMDocument> findCMDocument(DOMDocument xmlDocument, String nam
CMDocument cmDocument = findCMDocument(xmlDocument.getDocumentURI(), publicId, systemId,
modelProvider);
if (cmDocument != null) {
findByStandardAssociation = true;
documents.add(cmDocument);
}
}
}
}
if (documents.isEmpty()) {
if (!findByStandardAssociation) {
// Find by file association
CMDocument cmDocument = findCMDocument(xmlDocument.getDocumentURI(), namespaceURI, null, null);
if (cmDocument != null) {
documents.add(cmDocument);
Expand Down

0 comments on commit 3e580dc

Please sign in to comment.