Format and Indent - Inserts line break

Are you missing a feature? Request its implementation here.
angela
Posts: 11
Joined: Tue Jan 30, 2007 10:28 pm

Format and Indent - Inserts line break

Post by angela »

I have the following settings in standalone version 8.2, but Format and Indent is still inserting a line break in the attribute list.

What other settings do I need to prevent this?

Line width - format and indent = 1000
Indent size = 4 spaces
[ ] Break line before attribute's name
[ x ] Preserve empty lines
[ x ] Preserve text as it is
[ x ] Preserve line breaks in attributes

I want my code to look like this:

Code: Select all


<xsl:variable name="a" select="if (b) 
then b
else if (c)
then c
else d" />


Instead, it looks like this:

Code: Select all

<xsl:variable name="a"
select="if (b)
then b
else if (c)
then c
else d" />
Please advise.
Thanks!
Angela Williams
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

With your line width and indent size, Break line before attribute's name disabled and Preserve empty lines, Preserve text as it is and Preserve line breaks in attributes enabled the Format and Indent operation does not produce the code

Code: Select all

<xsl:variable name="a"
select="if (b)
then b
else if (c)
then c
else d" />
It does not matter the format before applying the operation. The select attribute is always on the same line with the name one. The select attribute goes to the next line only if I decrease the line width. Please send us your oXygen preferences stored in [home-folder]\Application Data\com.oxygenxml as a zip archive. [home-folder] is usually C:\Documents and Settings\login-name on Windows computers.


Regards,
Sorin
angela
Posts: 11
Joined: Tue Jan 30, 2007 10:28 pm

Post by angela »

Aha - since you directed me to the properties folder, I was able to find the problem.

I did have the line width set to 1000, but the 'Detect Line Width on Open' was checked, which apparently overrides the set linewidth.

I unchecked this box and now Format and Indent works as I expect it to.

Thanks for your help!
Thanks!
Angela Williams
Post Reply