So I've got a completely clean install of Craft 3: RC 2. I've installed Redactor, and nothing else.

In the templates/index.twig file; this is all I have:

{% set test = ['one', 'two', 'three'] %}

{% for t in test %}
  {{ t }}
{% endfor %}


enter image description here

After some trial and error, I figured out that content without any html markup will be wrapped with 'pre' tags by default. Is there an option to stop this behaviour? Maybe a general config option I can disable?


Pretty sure that's just your browser's console trying to tidy things up when you inspect.

If you View Page Source, I'd guess it wouldn't be there.

I also just tested this with your example code on a fresh Craft 3 install on the latest Chrome and Firefox on Windows and the latest Safari on OSX and was not able to reproduce your picture.

| improve this answer | |

Thanks for taking the time to replicate this Brad.

You are quite right. This has nothing to do with Craft 3. Turns out the json-viewer Chrome extension I have installed was adjusting the markup! Uninstalling it did the trick.

I've never seen anything do that before. Should I be remove this question from StackExchange?

Thanks again.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.