-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support advanced characters for entity name. #718
Support advanced characters for entity name. #718
Conversation
8120c9c
to
e3d3ee8
Compare
This PR fixes the issue Entity names with underscore and backspace (the 4 issue from redhat-developer/vscode-xml#262). I did some refactoring to use the same code for entity range diagnostics, completion, and definition |
e3d3ee8
to
fc9bf8b
Compare
I don't know if this is caused by this PR, but given the following xml: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"[
<!ENTITY mdash "—">
]>
m|
<web-app>
<display-name>Servlet 2.3 Web Application</display-name>
</web-app> when typing anything outside the nodes, I get an NPE:
There's no issue with vscode-xml 0.11.0 |
Opened #720 about that last bug |
.../src/test/java/org/eclipse/lemminx/extensions/entities/EntitiesCompletionExtensionsTest.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/eclipse/lemminx/extensions/entities/EntitiesDefinitionExtensionsTest.java
Outdated
Show resolved
Hide resolved
fc9bf8b
to
d92270d
Compare
Yes it's a a new bug that you have opened #720 |
d92270d
to
569ebd4
Compare
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/utils/XMLPositionUtility.java
Outdated
Show resolved
Hide resolved
2bfe3d0
to
c9446f7
Compare
Sorry I push my current work for entities hover in this branch. I removed it, now you should not see hover. |
d947252
to
f36d32a
Compare
I found an edge case, which I think is caused by this code:
When trying Go to definition in this case, with the cursor on the I think this issue would be very rare, however |
f36d32a
to
5a7d161
Compare
@xorye I change the strategy to discover entity. The referenced entity must be ends with ';'. So in your case definition will not work. You must write ';' at the end of helloword. |
...inx/src/main/java/org/eclipse/lemminx/extensions/contentmodel/participants/DTDErrorCode.java
Outdated
Show resolved
Hide resolved
you could also detect if there's a whitespace |
I think it's a bad idea, because entity reference must start with '&' and ends with ';' |
5a7d161
to
32ef7d0
Compare
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/utils/XMLPositionUtility.java
Outdated
Show resolved
Hide resolved
32ef7d0
to
7ad2546
Compare
See redhat-developer/vscode-xml#262 Signed-off-by: azerr <azerr@redhat.com>
Support advanced characters for entity name.
See redhat-developer/vscode-xml#262
Signed-off-by: azerr azerr@redhat.com