History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-13460
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Maxim Shafirov
Reporter: Alexander Chernikov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

HTML code style (formatting): "Insert new line before" setting is blocked with "Don't break if inline content"

Created: 21 Jan 07 16:29   Updated: 21 Jan 07 16:29
Component/s: HTML.Editing, Code Formatting and Code Style
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 6,658


 Description  « Hide
Get the HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
		"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<body>
		<p>
			Line 1.
			Line 2.	</p>
		<h3>Header 3.</h3>
	</body>
</html>

I would like to apply formatting (Ctrl+Alt+L) to get the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
		"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<body>
		<p>
			Line 1.
			Line 2.
		</p>

		<h3>Header 3.</h3>
	</body>
</html>

i.e. aligned <p> element and empty line before <h3>. When I have HTML code style settings

  • Insert new line before = body, div, p, h1, h2, h3, ...
  • Don't break if inline content = title, h1, h2, h3 // NO p
    then formatting does the following:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    		"http://www.w3.org/TR/html4/loose.dtd">
    <html>
    	<body>
    		<p>
    			Line 1.
    			Line 2.
    		</p>
    		<h3>Header 3.</h3>
    	</body>
    </html>

When I add p to "Don't break if inline content" I get the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
		"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<body>
		<p>
			Line 1.
			Line 2. </p>

		<h3>Header 3.</h3>
	</body>
</html>

Seems that "Insert new line before" interacts with "Don't break if inline content", but it should not.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.