Community
Participate
Working Groups
Created attachment 251389 [details] an example xml file showing that VEX adds a line break in the middle of <programlisting> tags. I created a DocBook xml file with Vex. In the xml file, I had a line of text wrapped in <literallayout> or <programlisting> tags. The line of text is not too long, compared with the "line width" setup in the Vex preference page. After processing the file through xsltproc to produce a HTML file, I found that the line of text is broken into two lines. Then I realized that in order to reformat the xml file, Vex added line breaks in the middle of my line of text surrounded by the docbook verbatim tags. I have attached a xml file with this problem. The Vex line width is set to 80. I think if a line with such a verbatim tag is longer than the line width, Vex should add line breaks before the verbatim tags, not in the middle of it.
New Gerrit change created: https://git.eclipse.org/r/47213
In the docbook CSS definition, the formalpara > para element is erroneously defined as inline. Verbatim content in an inline element is not possible, so the pre CSS for programlisting is ignored when the document is written. Commit 459fad079da3de4b70c72cd9419df9bba5605611 removes the illegal inline definition. In my opinion, Vex should not destroy a document when a simple CSS definition is wrong, so we should not rely on a 'inline' definition in DocumentWriter.
Gerrit change https://git.eclipse.org/r/47213 was merged to [master]. Commit: http://git.eclipse.org/c/mylyn/org.eclipse.mylyn.docs.vex.git/commit/?id=459fad079da3de4b70c72cd9419df9bba5605611
(In reply to Carsten Hiesserich from comment #2) > In my opinion, Vex should not destroy a document when a simple CSS > definition is wrong, so we should not rely on a 'inline' definition in > DocumentWriter. Yes, that's right, there should be no connection between the CSS (i.e. visual representation) and the represenation of the content in the file. The reason why it is done is to have some reasonable pretty printing in the file. A better alternative would be to infer the "inline" property of an element by just looking if there is some text in the element's parent around. This would lead to a more consistent way of pretty printing, because it stays stable even if the CSS is switched.
fixed, will come in the next milestone