This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 190233 - Text shift when reformatting the same source several times
Summary: Text shift when reformatting the same source several times
Status: RESOLVED DUPLICATE of bug 144164
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-08 09:49 UTC by pjbazin
Modified: 2012-10-15 13:30 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
sample php file where source has to be formatted (127 bytes, text/html)
2010-09-08 09:49 UTC, pjbazin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pjbazin 2010-09-08 09:49:29 UTC
Created attachment 101929 [details]
sample php file where source has to be formatted

When formatting a HTML page in PHP file where PHP includes a condition instruction devided into two seperated PHP sequences, a text line that is not introduced by a HTML tag is continuously shifted on the right.

Try Crtl+Shift+F on the this sample :

<html>
	<head>
	</head>

	<body>
		<div>
			<? if ($a) { ?>
				<p>line 1	
					line 2</p>	
			<? } ?>
		</div>
	</body>
</html>
Comment 1 Petr Pisl 2010-09-08 11:48:39 UTC
If I understand correctly, you think that the problem is in 

<p>line1
    line2</p>.

I'm correct?

But this is not a bug. Actually this is formatted by html formatter and this right. The line2 is inside <p></p> and for this reason is indented with 4 spaces. 

IMHO the html formatter should format this as
<p>
    line1
    line2
</p>
Comment 2 Marek Fukala 2010-10-26 11:23:02 UTC
There is no formatting / prettyprinting support for html code => enhancement
Comment 3 Marek Fukala 2012-10-15 13:30:27 UTC

*** This bug has been marked as a duplicate of bug 144164 ***