mildlygeeky / craft_kint

Adds Kint, an in-app PHP debugger, to Craft CMS for use in Twig and PHP.
MIT License
47 stars 4 forks source link

Code in output #4

Closed bossanova808 closed 8 years ago

bossanova808 commented 8 years ago

Hi Patrick

as per slack, on my homepage if I

{% set test = 'blah' %}
   {{ craft.kint.d(test) }}

I am seeing some unparsed js:

"),b.document.close()},w=function(a,b){function c(a){var c=1===b?a.replace(/^#/,""):a;if(isNaN(c))return a.trim().toLocaleLowerCase();c=parseFloat(c);return isNaN(c)? a.trim():c}var d=a.tBodies[0];[].slice.call(a.tBodies[0].rows).sort(function(a,d){a=c(a.cells[b].textContent);d=c(d.cells[b].textContent);return ad?1:0}).forEach(function(a){d.appendChild(a)})},x=function(a){var b=document.querySelector(".kint-focused");b&&m(b,"kint-focused");if(-1!==a){b=e[a];l(b,"kint-focused");var c=function(a){return a.offsetTop+(a.offsetParent?c(a.offsetParent):0)};window.scrollTo(0,c(b)-window.innerHeight/2)}f=a},y=function(a,b){a?0>--b&&(b=e.length-1):++b>=e.length&& (b=0);x(b);return!1};window.addEventListener("click",function(a){var b=a.target,c=b.nodeName.toLowerCase();if(t(b)){if("dfn"===c)g(b),b=b.parentNode;else if("var"===c)b=b.parentNode,c=b.nodeName.toLowerCase();else if("th"===c)return a.ctrlKey||w(b.parentNode.parentNode.parentNode,b.cellIndex),!1;if("li"===c&&"kint-tabs"===b.parentNode.className)return"kint-active-tab"!==b.className&&(s(b),-1!==f&&u()),!1;if("nav"===c)return"footer"===b.parentNode.nodeName.toLowerCase()?(b=b.parentNode,k(b)?m(b):l(b)): setTimeout(function(){0a&&(d=a);p

→$debug Craft\Commerce_OrderModel(32)

Screenshot for proof ;) : 2016-02-16_14-09-07

bossanova808 commented 8 years ago

Update - I have sort of solved this by including my js in my master layout via <script src='/js/app.js'></script> rather than {% includeJsFile '/js/app.js' %} - and then it works

mildlygeeky commented 8 years ago

Thanks - this is fixed in 1.0.2, which is now live.