{"action":"opened","issue":{"url":"https://api.github.com/repos/gajus/dindent/issues/13","labels_url":"https://api.github.com/repos/gajus/dindent/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/gajus/dindent/issues/13/comments","events_url":"https://api.github.com/repos/gajus/dindent/issues/13/events","html_url":"https://github.com/gajus/dindent/issues/13","id":60391335,"number":13,"title":"Support for custom ignorable sections","user":{"login":"InstanceOfMichael","id":4094542,"avatar_url":"https://avatars.githubusercontent.com/u/4094542?v=3","gravatar_id":"","url":"https://api.github.com/users/InstanceOfMichael","html_url":"https://github.com/InstanceOfMichael","followers_url":"https://api.github.com/users/InstanceOfMichael/followers","following_url":"https://api.github.com/users/InstanceOfMichael/following{/other_user}","gists_url":"https://api.github.com/users/InstanceOfMichael/gists{/gist_id}","starred_url":"https://api.github.com/users/InstanceOfMichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InstanceOfMichael/subscriptions","organizations_url":"https://api.github.com/users/InstanceOfMichael/orgs","repos_url":"https://api.github.com/users/InstanceOfMichael/repos","events_url":"https://api.github.com/users/InstanceOfMichael/events{/privacy}","received_events_url":"https://api.github.com/users/InstanceOfMichael/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-09T18:50:22Z","updated_at":"2015-03-09T18:50:22Z","closed_at":null,"body":"Suppose I have the code:\r\n\r\n```\r\n<?php\r\n\r\n    $var = 1;\r\n\r\n    foreach((array)$var)\r\n    {\r\n        $var++;\r\n    }\r\n\r\n?>\r\n<html>\r\n    <body>\r\n        <table>\r\n            <div>\r\n                <marquee>\r\n                    text\r\n                </marquee>\r\n            </div>\r\n        </table>\r\n    </body>\r\n</html>\r\n```\r\n\r\nWhich turns out like:\r\n\r\n```\r\n<?php $var = 1; foreach((array)$var) { $var++; } ?>\r\n    <html>\r\n        <body>\r\n            <table>\r\n                <div>\r\n                    <marquee> text </marquee>\r\n                </div>\r\n            </table>\r\n        </body>\r\n    </html>\r\n```\r\n\r\nhttp://gajus.com/sandbox/dindent/sandbox/?uid=3hw0Vf7DCss33K5HH0L6\r\n\r\nBut obviously I am expecting it to turn out like:\r\n\r\n```\r\n<?php\r\n\r\n    $var = 1;\r\n\r\n    foreach((array)$var)\r\n    {\r\n        $var++;\r\n    }\r\n\r\n?>\r\n<html>\r\n    <body>\r\n        <table>\r\n            <div>\r\n                <marquee> text </marquee>\r\n            </div>\r\n        </table>\r\n    </body>\r\n</html>\r\n```\r\n\r\nThe specific problem being that:\r\n * My templating and/or backend code was adjusted.\r\n * The ``<html>`` was given an extra indent.\r\n\r\nI found this works out perfectly if you substitute ``<?php [..] ?>`` for ``<script>[..]</script>`` http://gajus.com/sandbox/dindent/sandbox/?uid=E5EUanFjNTHt3e5whxmK \r\n\r\nSo a great feature request would be to let us specify additional open/closers. In my case, I need the following treated like ignored openers/closers:\r\n * ``<?php``, ``?>``\r\n * ``{{``, ``}}``\r\n * ``{{{``, ``}}}``"}}