{"action":"created","issue":{"url":"https://api.github.com/repos/vkiryukhin/vkBeautify/issues/5","labels_url":"https://api.github.com/repos/vkiryukhin/vkBeautify/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/vkiryukhin/vkBeautify/issues/5/comments","events_url":"https://api.github.com/repos/vkiryukhin/vkBeautify/issues/5/events","html_url":"https://github.com/vkiryukhin/vkBeautify/pull/5","id":16225569,"number":5,"title":"Trailing whitespace added to text of elements with namespaces","user":{"login":"bbpennel","id":969810,"avatar_url":"https://avatars.githubusercontent.com/u/969810?v=3","gravatar_id":"","url":"https://api.github.com/users/bbpennel","html_url":"https://github.com/bbpennel","followers_url":"https://api.github.com/users/bbpennel/followers","following_url":"https://api.github.com/users/bbpennel/following{/other_user}","gists_url":"https://api.github.com/users/bbpennel/gists{/gist_id}","starred_url":"https://api.github.com/users/bbpennel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbpennel/subscriptions","organizations_url":"https://api.github.com/users/bbpennel/orgs","repos_url":"https://api.github.com/users/bbpennel/repos","events_url":"https://api.github.com/users/bbpennel/events{/privacy}","received_events_url":"https://api.github.com/users/bbpennel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2013-07-01T17:30:52Z","updated_at":"2015-06-16T16:01:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/vkiryukhin/vkBeautify/pulls/5","html_url":"https://github.com/vkiryukhin/vkBeautify/pull/5","diff_url":"https://github.com/vkiryukhin/vkBeautify/pull/5.diff","patch_url":"https://github.com/vkiryukhin/vkBeautify/pull/5.patch"},"body":"An issue I'm having is that when a tag contains a namespace it causes the closing tag of the element to drop to a new line and indent, which adds additional whitespace into the text.\r\n\r\n```javascript\r\nvkbeautify.xml('<root><child xmlns=\"ns\">Text</child></root>');\r\n```\r\nProduces:\r\n```xml\r\n<root>\r\n    <child \r\n        xmlns=\"ns\">Text\r\n    </child>\r\n</root>\r\n```\r\nThis pull request prevents that newline and indent from being added to elements when they have namespaces.\r\n```javascript\r\n<root>\r\n    <child\r\n        xmlns=\"ns\">test</child>\r\n</root>\r\n```\r\n\r\nIndentation should still be working correctly for elements nested in elements with namespaces.\r\n\r\n```javascript\r\nvkbeautify.xml('<root><child xmlns=\"ns\"><test></test></child></root>');\r\n```\r\nProduces:\r\n```xml\r\n<root>\r\n    <child\r\n        xmlns=\"ns\">\r\n        <test></test>\r\n    </child>\r\n</root>\r\n```\r\n\r\nAnd thanks for making this great tool!"},"comment":{"url":"https://api.github.com/repos/vkiryukhin/vkBeautify/issues/comments/112480018","html_url":"https://github.com/vkiryukhin/vkBeautify/pull/5#issuecomment-112480018","issue_url":"https://api.github.com/repos/vkiryukhin/vkBeautify/issues/5","id":112480018,"user":{"login":"gentisaliu","id":1090186,"avatar_url":"https://avatars.githubusercontent.com/u/1090186?v=3","gravatar_id":"","url":"https://api.github.com/users/gentisaliu","html_url":"https://github.com/gentisaliu","followers_url":"https://api.github.com/users/gentisaliu/followers","following_url":"https://api.github.com/users/gentisaliu/following{/other_user}","gists_url":"https://api.github.com/users/gentisaliu/gists{/gist_id}","starred_url":"https://api.github.com/users/gentisaliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentisaliu/subscriptions","organizations_url":"https://api.github.com/users/gentisaliu/orgs","repos_url":"https://api.github.com/users/gentisaliu/repos","events_url":"https://api.github.com/users/gentisaliu/events{/privacy}","received_events_url":"https://api.github.com/users/gentisaliu/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T16:01:48Z","updated_at":"2015-06-16T16:01:48Z","body":"Good job! :+1: "}}