Browse Source

fix nl2br filter

master
ghost 10 months ago
parent
commit
48339a1076
  1. 4
      src/Twig/AppExtension.php
  2. 2
      templates/default/main/index.html.twig
  3. 2
      templates/default/main/namespace.html.twig
  4. 2
      templates/default/main/transaction.html.twig

4
src/Twig/AppExtension.php

@ -92,9 +92,7 @@ class AppExtension extends AbstractExtension
case \Kvazar\Index\Manticore::TYPE_STRING: case \Kvazar\Index\Manticore::TYPE_STRING:
return nl2br( return (string) $value;
$value
);
case \Kvazar\Index\Manticore::TYPE_BIN: case \Kvazar\Index\Manticore::TYPE_BIN:

2
templates/default/main/index.html.twig

@ -27,7 +27,7 @@
{{ record.key | format_type(record.type.key) }} {{ record.key | format_type(record.type.key) }}
</div> </div>
<div class="mb-20 of-a"> <div class="mb-20 of-a">
{{ record.value | format_type(record.type.value) }} {{ record.value | format_type(record.type.value) | nl2br }}
</div> </div>
<div class="f-s-12"> <div class="f-s-12">
{{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }} {{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }}

2
templates/default/main/namespace.html.twig

@ -28,7 +28,7 @@
{{ record.key | format_type(record.type.key) }} {{ record.key | format_type(record.type.key) }}
</div> </div>
<div class="mb-20 of-a"> <div class="mb-20 of-a">
{{ record.value | format_type(record.type.value) }} {{ record.value | format_type(record.type.value) | nl2br }}
</div> </div>
<div class="f-s-12"> <div class="f-s-12">
{{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }} {{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }}

2
templates/default/main/transaction.html.twig

@ -28,7 +28,7 @@
{{ record.key | format_type(record.type.key) }} {{ record.key | format_type(record.type.key) }}
</div> </div>
<div class="mb-20 of-a"> <div class="mb-20 of-a">
{{ record.value | format_type(record.type.value) }} {{ record.value | format_type(record.type.value) | nl2br }}
</div> </div>
<div class="f-s-12"> <div class="f-s-12">
{{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }} {{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }}

Loading…
Cancel
Save