@penskemediacorp/twig-to-php-parser 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ {% for item in slides %}
2
+ <div>
3
+ {{ item|markup }}
4
+ </div>
5
+ {% endfor %}
@@ -0,0 +1,5 @@
1
+ <?php foreach ( $slides ?? [] as $item ) { ?>
2
+ <div>
3
+ <?php echo wp_kses_post( $item ?? '' ); ?>
4
+ </div>
5
+ <?php } ?>
@@ -141,6 +141,10 @@ function twig_to_php_parser( $patterns_dir_path, $template_dir_path, $is_using_p
141
141
  if ( $has_filter ) {
142
142
  $string_parts = explode( '|', $variable_name );
143
143
  $variable_name = $string_parts[0];
144
+
145
+ if ( 'markup' === $string_parts[1] ) {
146
+ $is_markup = true;
147
+ }
144
148
  }
145
149
 
146
150
  if ( ! empty( $is_url ) ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@penskemediacorp/twig-to-php-parser",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "> TODO: description",
5
5
  "author": "laras126 <laras126@gmail.com>",
6
6
  "homepage": "https://github.com/penske-media-corp/pmc-larva#readme",
@@ -26,5 +26,5 @@
26
26
  "chalk": "^4.1.0",
27
27
  "exec-php": "0.0.5"
28
28
  },
29
- "gitHead": "99e5dc47f4a054fda8d8dfab354199a434cd4725"
29
+ "gitHead": "ae579c2215c1e32f409cc2901eb5c95b60904bb7"
30
30
  }