Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-7859

Formatting (indenting) of php/html mixed content doesn't work

    Details

      Description

      When trying to format (indent/tidy) php/html mixed content the result ain't what I had expected it to be:

      <div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?>
      	<?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
      	<?php if ($this->headline): ?>
      	<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
      	<?php endif; ?>
       
      	<figure class="image_container"<?php if ($this->margin): ?>
      		style="<?php echo $this->margin; ?>"<?php endif; ?>>
      		<?php if ($this->href): ?>
      		<a href="<?php echo $this->href; ?>"<?php if ($this->linkTitle): ?> title="<?php echo $this->linkTitle; ?>"<?php endif; ?><?php echo $this->attributes; ?>>
      		<?php endif; ?> <img src="<?php echo $this->src; ?>"<?php echo $this->imgSize; ?> alt="<?php echo $this->alt; ?>"<?php if ($this->title): ?> title="<?php echo $this->title; ?>"<?php endif; ?>>
      		<?php if ($this->href): ?> </a>
      		<?php endif; ?>
      		<?php if ($this->caption): ?>
      		<figcaption class="caption" style="width:<?php echo $this->arrSize[0]; ?>px">
      			<?php echo $this->caption; ?>
      			<?php
      			function hallo() {
      			echo 'Hallo';
      			}
      			?>
      		</figcaption>
      		<?php endif; ?>
      	</figure>
       
      </div>
      

      The correct indentation would be:

      <div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?>
      	<?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
      	<?php if ($this->headline): ?>
      		<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
      	<?php endif; ?>
       
      	<figure class="image_container"<?php if ($this->margin): ?>
      		style="<?php echo $this->margin; ?>"<?php endif; ?>>
      		<?php if ($this->href): ?>
      			<a href="<?php echo $this->href; ?>"<?php if ($this->linkTitle): ?> title="<?php echo $this->linkTitle; ?>"<?php endif; ?><?php echo $this->attributes; ?>>
      		<?php endif; ?>
      		<img src="<?php echo $this->src; ?>"<?php echo $this->imgSize; ?> alt="<?php echo $this->alt; ?>"<?php if ($this->title): ?> title="<?php echo $this->title; ?>"<?php endif; ?>>
      		<?php if ($this->href): ?>
      			</a>
      		<?php endif; ?>
      		<?php if ($this->caption): ?>
      		<figcaption class="caption" style="width:<?php echo $this->arrSize[0]; ?>px">
      			<?php echo $this->caption; ?>
      			<?php
      				function hallo() {
      					echo 'Hallo';
      				}
      			?>
      		</figcaption>
      		<?php endif; ?>
      	</figure>
       
      </div>
      

      The inline php block ("function hallo") isn't formatted at all. the img-tag isn't put to the next line, although it is a newly opened tag. It seems, that generally no php-if-tags cause an indentation of the next line.

        Attachments

          Activity

            People

            • Assignee:
              pinnamuri Praveen Innamuri (Inactive)
              Reporter:
              the_unknown Dennis Patzer
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Git Source Code