space key when space insignificant

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
steve.cuzner
Posts: 69

space key when space insignificant

Thu Dec 08, 2016 1:54 am

Given this example from https://www.oxygenxml.com/doc/versions/18.1/ug-editor/topics/format-and-indent-xml.html?hl=spaces

Code: Select all

<p>The file is located in <i>HOME</i>/<i>USER</i>/hello.
     This is a <strong>big</strong>

<emphasis>deal</emphasis>.
</p>

In this example, whitespace should not be introduced around the i tags as it would introduce extra significant whitespace into the document. The space between the end </strong> tag and the beginning <emphasis> tag should be normalized to a single space, not zero spaces.


As the documentation says, the multiple space characters following </strong> > 1 are insignificant. In the author view, is it possible to know that an additional space would be insignificant and disable the space key to prevent the introduction of insignificant space?
Radu
Posts: 5510

Re: space key when space insignificant

Thu Dec 08, 2016 11:09 am

Hi Steve,

I understand, this makes sense, we already have an internal issue for it and I added your feedback to it.
Actually at some point we tried to implement this behavior of disallowing entering consecutive white spaces in elements which are not space-preserve and one situation where this would be annoying would be when you have two words like this {code}word1| word3{code} with the caret placed after the "word1" and you want to insert a space and then insert "word2". But the application would prohibit inserting a space because you would have two consecutive spaces between the words, but that would be a temporary step until the tech writer inserts the text. How would you see this issue handled by the application?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
steve.cuzner
Posts: 69

Re: space key when space insignificant

Thu Dec 08, 2016 5:18 pm

I would expect that if you are after word1 and before the space, if you type the space bar the cursor would advance to between the space and word3 which would allow you to start typing word2. This would require you to add a new space between word2 and word3, but that would be a natural action for a writer in my opinion.
Radu
Posts: 5510

Re: space key when space insignificant

Fri Dec 09, 2016 10:53 am

Hi Steve,

About this remark:

if you type the space bar the cursor would advance to between the space and word3


So the cursor would be moved right to the beginning of word3? As a writer I would be inclined to add one more space and then move the cursor to the left before typing because I would not want the word I'm typing to be joined with word3.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “Common Problems”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests