Menu

#20 php code, mixed with html

1.0
closed
nobody
2023-04-16
2009-08-12
No

hi,
actually you can use artistic style with php code.
There's a problem when you are mixing html code with php code.

example :
<php
//----------------------------------------
echo "some php code here ";
?>
soome html <br > <b>code</b> here
<?php
echo "again some php code";
//---------------------------------------
?>

Could artistic style just ignore the html code, (like if it was commented for instance),
and format the php code ?
thanks

Discussion

  • Jim Pattee

    Jim Pattee - 2009-12-21

    hi:

    There are several formatters for PHP. Have you tried them? If so, why is Artistic Style better? I haven't tested with PHP and am surprised it works at all.

     
  • Jim Pattee

    Jim Pattee - 2018-01-27

    Ticket moved from /p/astyle/bugs/34/

     
  • André Simon

    André Simon - 2023-04-16
    • status: open --> closed
    • Milestone: --> 1.0
     
  • André Simon

    André Simon - 2023-04-16

    Hi, the astyle parser relies on C code conventions. Other languages might have suble syntax variations which could cause inproper formatting or indentation, which then require some workarounds in the astyle code. In the coming releases we focus on improved support of modern C++ features and refactoring, so new languages will not be added soon.

     

Log in to post a comment.