Skip to content

Instantly share code, notes, and snippets.

@pugsley
Created May 20, 2014 22:23
Show Gist options
  • Save pugsley/0e3263fb5ef43f8fcd9b to your computer and use it in GitHub Desktop.
Save pugsley/0e3263fb5ef43f8fcd9b to your computer and use it in GitHub Desktop.
Slightly more readable twig dump (without writing an extension)
<pre style='font-size: 12px;font-family: monospace;'>
{{ dump()|
replace({
"=>\n": ":",
"[\"": "",
"\"]": ""
})|
replace({
": ": ": "
})|
replace({
": ": ": "
})|
replace({
": ": ": "
})|
replace({
": ": ": "
})|
replace({
": ": ": "
})|
replace({
": ": ": "
})|
replace({
": ": ": "
})
}}
</pre>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment