{"action":"created","issue":{"url":"https://api.github.com/repos/cheeriojs/cheerio/issues/1084","repository_url":"https://api.github.com/repos/cheeriojs/cheerio","labels_url":"https://api.github.com/repos/cheeriojs/cheerio/issues/1084/labels{/name}","comments_url":"https://api.github.com/repos/cheeriojs/cheerio/issues/1084/comments","events_url":"https://api.github.com/repos/cheeriojs/cheerio/issues/1084/events","html_url":"https://github.com/cheeriojs/cheerio/issues/1084","id":259009871,"number":1084,"title":"Getting location info of a node","user":{"login":"shalithasuranga","id":18402702,"avatar_url":"https://avatars3.githubusercontent.com/u/18402702?v=4","gravatar_id":"","url":"https://api.github.com/users/shalithasuranga","html_url":"https://github.com/shalithasuranga","followers_url":"https://api.github.com/users/shalithasuranga/followers","following_url":"https://api.github.com/users/shalithasuranga/following{/other_user}","gists_url":"https://api.github.com/users/shalithasuranga/gists{/gist_id}","starred_url":"https://api.github.com/users/shalithasuranga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shalithasuranga/subscriptions","organizations_url":"https://api.github.com/users/shalithasuranga/orgs","repos_url":"https://api.github.com/users/shalithasuranga/repos","events_url":"https://api.github.com/users/shalithasuranga/events{/privacy}","received_events_url":"https://api.github.com/users/shalithasuranga/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-20T01:10:44Z","updated_at":"2018-03-01T16:41:32Z","closed_at":null,"author_association":"NONE","body":"Can we take line & column details of a specific node in cheerio? If not, is that feature possible to add with existing html parser?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/cheeriojs/cheerio/issues/comments/369652621","html_url":"https://github.com/cheeriojs/cheerio/issues/1084#issuecomment-369652621","issue_url":"https://api.github.com/repos/cheeriojs/cheerio/issues/1084","id":369652621,"user":{"login":"trevorhreed","id":3343902,"avatar_url":"https://avatars1.githubusercontent.com/u/3343902?v=4","gravatar_id":"","url":"https://api.github.com/users/trevorhreed","html_url":"https://github.com/trevorhreed","followers_url":"https://api.github.com/users/trevorhreed/followers","following_url":"https://api.github.com/users/trevorhreed/following{/other_user}","gists_url":"https://api.github.com/users/trevorhreed/gists{/gist_id}","starred_url":"https://api.github.com/users/trevorhreed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trevorhreed/subscriptions","organizations_url":"https://api.github.com/users/trevorhreed/orgs","repos_url":"https://api.github.com/users/trevorhreed/repos","events_url":"https://api.github.com/users/trevorhreed/events{/privacy}","received_events_url":"https://api.github.com/users/trevorhreed/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T16:41:32Z","updated_at":"2018-03-01T16:41:32Z","author_association":"NONE","body":"Setting the option `xmlMode` to `true` will direct Cheerio to use htmlparser2. With that set, you can set the `withStartIndices` to `true` as well and then each node will have a `startIndex` property attached to them. However, beware that using Cheerio with `xmlMode` set to `true` may break some use cases. For example, I am using Cheerio to pull JavaScript code out of a `<script>` tag as part of a build process. With `xmlMode` set to `true`, the code gets mangled (html character encoding, etc).\r\n\r\nAfter doing some digging, the new, default parser used under the hood (parse5) also has an option for adding location information to nodes (appropriately named [locationInfo](http://inikulin.github.io/parse5/interfaces/options.parseroptions.html#locationinfo)). Unfortunately, Cheerio doesn't yet support passing this option through. Perhaps, if I get some time, I'll create a PR."}}
{"actor":{"display_login":"trevorhreed"}}