Unwrapping element inserts extra spaces
Posted: Fri Jan 03, 2020 5:08 pm
Hi,
I am trying to remove unnecessary <p> elements inside <li>, <entry>, etc. I have found the following happens for this example:
Thank you.
Best regards,
Ozana
I am trying to remove unnecessary <p> elements inside <li>, <entry>, etc. I have found the following happens for this example:
Code: Select all
<ul>
<li><p>something</p></li>
<li>
<p>else</p>
</li>
</ul>
- In Text mode, using either Refactoring>Delete Element Tags (Alt+Shift+X) or Refactoring>Elements>Unwrap element with target element "li/p", the result will be:
This results in extra space before and after "else", which is not equivalent with the original. With Format and Indent we can see the extra spaces:
Code: Select all
<ul> <li>something</li> <li> else </li> </ul>
Code: Select all
<ul> <li>something</li> <li> else </li> </ul>
- Looking at the same example in Author mode, Refactoring>Elements>Unwrap element with target element "li/p" gives the same result:
Code: Select all
<ul> <li>something</li> <li> else </li> </ul>
- However, using Refactoring>Delete Element Tags (Alt+Shift+X) in Author mode does what I expect it to do and the result is:
Code: Select all
<ul> <li>something</li> <li>else</li> </ul>
Thank you.
Best regards,
Ozana