-
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
DTD losing content on format fixed #200
DTD losing content on format fixed #200
Conversation
63116b7
to
a8c1f9f
Compare
@Test | ||
public void testDTDFormattingInternal() throws BadLocationException { | ||
String content = | ||
"<?xml version=\"1.0\"?>" + lineSeparator() + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use lineSeparator() because your tests depends on OS. Please use \r or \ r\n.
If you use Eclipse to develop Java, you can copy a content of XML file and go to the Java Editor code. Type just "" and copy/paste the pasted XML content inside the "". Java Editor JDT will manage \r
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though \r\n was specific to Windows, do you know why it works for me on linux when I run tests using \r\n?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry with my bad explanation.
I though \r\n was specific to Windows,
Yes it is.
I meant that we have tests which is not linked to an OS. So in your Linux case, you will havelineSparatator= \r and in my OS Windows case, I will have lineSparatator=\r\n So the offset will be different.
I agree with you, your test doesn't use offset so we will hav eno problem, but it should be more clean to have tests which hard coded the line separator.
Hope you will understand my explanation.
Very cool PR @NikolasKomonen ! IMHO, I think it should really cool if we could use your scanner to manage in XMLDocument, the Entity to display it in the Outline, manage completion, etc |
@angelozerr yes! Thats what I was hoping we could eventually work on. This pr is just temporary to make sure DTD content doesn't disappear. |
Great! |
PR fixes the issues. @NikolasKomonen fix the line endings and we can merge it |
a8c1f9f
to
379e05f
Compare
@fbricon line endings fixed |
Fixes #198