Problem with formatting of PHP + HTML
I am using emacs 22.2.1, with php-mode 1.4.1a-nxhtml and nXhtml 1.52. When I create a file as follows:
-----------------
<table>
<tr>
<td>
<table>
<tr>
</tr>
<?php
for ($i=1;$i<5; $i++) {
if (1) {
echo "<tr><td>
}
if (1) {
if (1) {
if (1) {
?>
<tr>
<td>
<p>the brace below (should have 2 spaces in front of it!</p>
<td>
</tr>
<?php
}
}
}
$foo = "test".bar;
for ($i=1;$i<5; $i++) {
if () {
}
}
}
?>
</table>
</td>
</tr>
</table>
-------
and what I get when indenting using nxhtml-mumamo mode is:
-------
<table>
<tr>
<td>
<table>
<tr>
</tr>
<?php
for ($i=1;$i<5; $i++) {
if (1) {
echo "<tr><td>
}
if (1) {
if (1) {
if (1) {
?>
<tr>
<td>
<p>the brace below (should have 2 spaces in front of it!</p>
<td>
</tr>
<?php
}
}
}
$foo = "test".bar;
for ($i=1;$i<5; $i++) {
if () {
}
}
}
?>
</table>
</td>
</tr>
</table>
-------
i.e. the depth of indenting is lost from one chuck of PHP to the other and one chunck of HTML to the other. Is this what other people get, or have I configured emacs incorrectly?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- nXhtml Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: