Unibeautify / sparser

A framework of various language parsers
Other
93 stars 5 forks source link

Add PHP short echo tag detection #90

Closed joshbmarshall closed 5 years ago

joshbmarshall commented 5 years ago

This adds detection when parsing mixed php/html code for the php short echo mode, e.g. <?= $variable ?> A test case has also been added, based on one of the twig tests. The short echo tags were the only things stopping me from using prettydiff to format html with php intermixed

prettydiff commented 5 years ago

Thank you so much for the pull request. Everything looks almost perfect, but I request two minor additions:

  1. I would like you to add something tiny to the test case. Please add some CSS code since you also updated the lexers/style.ts file.

For example:

<style type="css">
    a {
        width: <?= $width_value ?>px; 
    }
</style>
  1. Update the version number in the package.json file and rebuild: node js/services build
joshbmarshall commented 5 years ago

No problems I've done those for you now