SE7ENSKY / jade2php

Unlock Jade for PHP! Convert Jade templates into raw PHP templates. CLI tool and JavaScript API. Test covered.
43 stars 10 forks source link

Characters $E2 $96 $A0 in the output #30

Closed OnkelTem closed 8 years ago

OnkelTem commented 9 years ago

This sample code:

each field, id in fields
  if field.separator
    != field.separator
  != field.wrapper_prefix
  != field.label_html
  != field.content
  != field.wrapper_suffix

results to this php output:

<?php if ($fields) : foreach ($fields as $id => $field) : $■['id'] = $id;$■['field'] = $field; ?>  <?php if ($field->separator) : ?><?= $field->separator ?><?php endif ?><?= $field->wrapper_prefix ?><?= $field->label_html ?><?= $field->content ?><?= $field->wrapper_suffix ?><?php endforeach; endif ?>

where squares represent sequence of characters with codes: E2 96 A0

image

This doesn't seem to harm my specific template (PHP 5.4.x) but I wonder what are those characters and why?

janwirth commented 8 years ago

I think they are temporary variable names for translating the js expressions to php. could be a little more semantic indeed, but who doesn't like some squares in their code? :)