{"action":"created","issue":{"url":"https://api.github.com/repos/jadejs/jade/issues/2165","labels_url":"https://api.github.com/repos/jadejs/jade/issues/2165/labels{/name}","comments_url":"https://api.github.com/repos/jadejs/jade/issues/2165/comments","events_url":"https://api.github.com/repos/jadejs/jade/issues/2165/events","html_url":"https://github.com/jadejs/jade/issues/2165","id":116691563,"number":2165,"title":"Make a plugin that adds Jade line/col information to the DOM","user":{"login":"TimothyGu","id":1538624,"avatar_url":"https://avatars.githubusercontent.com/u/1538624?v=3","gravatar_id":"","url":"https://api.github.com/users/TimothyGu","html_url":"https://github.com/TimothyGu","followers_url":"https://api.github.com/users/TimothyGu/followers","following_url":"https://api.github.com/users/TimothyGu/following{/other_user}","gists_url":"https://api.github.com/users/TimothyGu/gists{/gist_id}","starred_url":"https://api.github.com/users/TimothyGu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimothyGu/subscriptions","organizations_url":"https://api.github.com/users/TimothyGu/orgs","repos_url":"https://api.github.com/users/TimothyGu/repos","events_url":"https://api.github.com/users/TimothyGu/events{/privacy}","received_events_url":"https://api.github.com/users/TimothyGu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jadejs/jade/labels/plugin-request","name":"plugin-request","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-13T03:06:50Z","updated_at":"2015-11-16T16:44:45Z","closed_at":null,"body":"Migrated from #1879.\r\n\r\n----\r\n\r\nI want to create a middleware for express and jade. I'll publish it as a separate module. This module allows me to interactively open a text editor by selecting a DOM node in the browser. The text editor is opened in exactly the file and line that generated that DOM node. What I need from jade is to add an option to include filenames and line numbers in the HTML output. I've done an initial implementation. If the idea is accepted I will write tests for that.\r\n\r\nThis is how the output with this option enabled looks like:\r\n\r\n```html\r\n<html jade_file=\"/path/to/jade/examples/includes.jade\" jade_line=2>\r\n  <head jade_file=\"/path/to/jade/examples/includes/head.jade\" jade_line=1>\r\n    <title jade_line=2>My Site</title>\r\n    <!-- including other jade works-->\r\n    <script jade_file=\"/path/to/jade/examples/includes/scripts.jade\" jade_line=1 src=\"/javascripts/jquery.js\"></script>\r\n    <script jade_line=2 src=\"/javascripts/app.js\"></script>\r\n    <!-- including .html, .css, etc works--><style>\r\n  body {\r\n    padding: 50px;\r\n  }\r\n</style>\r\n  </head>\r\n  <body jade_file=\"/path/to/jade/examples/includes.jade\" jade_line=4>\r\n    <h1 jade_line=5>My Site</h1>\r\n    <p jade_line=6>Welcome to my super lame site.</p>\r\n    <div jade_file=\"/path/to/jade/examples/includes/foot.jade\" jade_line=1 id=\"footer\">\r\n      <p jade_line=2>Copyright (c) foobar</p>\r\n    </div>\r\n  </body>\r\n</html>\r\n```\r\n\r\nThis is a video of the feature I've built https://vimeo.com/121122160\r\n\r\nAs you can see there is a debug mode that can be toggled with a combination of key strokes and then by clicking on a DOM node the text editor opens in the file and line that generated the output. Which is going to save me A LOT of time.\r\n\r\nAs I said I only need some debug information in the HTML output. If the flag/idea is accepted to be included in jade to output this information I will complete this pull request with a new commit adding unit tests.\r\n\r\nThanks!\r\n\r\nCC @gimenete, @niftylettuce, & @jantimon."},"comment":{"url":"https://api.github.com/repos/jadejs/jade/issues/comments/157093224","html_url":"https://github.com/jadejs/jade/issues/2165#issuecomment-157093224","issue_url":"https://api.github.com/repos/jadejs/jade/issues/2165","id":157093224,"user":{"login":"TimothyGu","id":1538624,"avatar_url":"https://avatars.githubusercontent.com/u/1538624?v=3","gravatar_id":"","url":"https://api.github.com/users/TimothyGu","html_url":"https://github.com/TimothyGu","followers_url":"https://api.github.com/users/TimothyGu/followers","following_url":"https://api.github.com/users/TimothyGu/following{/other_user}","gists_url":"https://api.github.com/users/TimothyGu/gists{/gist_id}","starred_url":"https://api.github.com/users/TimothyGu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimothyGu/subscriptions","organizations_url":"https://api.github.com/users/TimothyGu/orgs","repos_url":"https://api.github.com/users/TimothyGu/repos","events_url":"https://api.github.com/users/TimothyGu/events{/privacy}","received_events_url":"https://api.github.com/users/TimothyGu/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T16:44:44Z","updated_at":"2015-11-16T16:44:44Z","body":"@jantimon, as you can see, the <p> is in a <div> with a `jade_file`, and `jade_file` is inherited."}}