{"action":"closed","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/3868","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/3868/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/3868/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/3868/events","html_url":"https://github.com/nim-lang/Nim/issues/3868","id":133798539,"number":3868,"title":"doc2 generates strange output for proc generated by template","user":{"login":"flyx","id":791710,"avatar_url":"https://avatars.githubusercontent.com/u/791710?v=3","gravatar_id":"","url":"https://api.github.com/users/flyx","html_url":"https://github.com/flyx","followers_url":"https://api.github.com/users/flyx/followers","following_url":"https://api.github.com/users/flyx/following{/other_user}","gists_url":"https://api.github.com/users/flyx/gists{/gist_id}","starred_url":"https://api.github.com/users/flyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyx/subscriptions","organizations_url":"https://api.github.com/users/flyx/orgs","repos_url":"https://api.github.com/users/flyx/repos","events_url":"https://api.github.com/users/flyx/events{/privacy}","received_events_url":"https://api.github.com/users/flyx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nim-lang/Nim/labels/Showstopper","name":"Showstopper","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-15T19:35:04Z","updated_at":"2016-03-04T22:08:54Z","closed_at":"2016-03-04T22:08:54Z","body":"```nimrod\r\nproc bar*(T: typedesc[string]): string = \"string\"\r\n\r\ntemplate foo(): stmt =\r\n    proc bar*(T: typedesc[int]): string = \"int\"\r\n\r\nfoo()\r\n```\r\n\r\nWith `nim doc2`, this generates output like this (simplified, without the html stuff):\r\n\r\n```\r\nproc bar[](T: typedesc[string]): string\r\n\r\nproc bar[](T: (system.[]|system.[]|system.[]|system.[]|system.[]|...)(typedesc, int)): string\r\n```\r\n\r\nSo it can handle the directly defined proc properly, but does strange things with the one generated with the template. The documentation of the second proc should look akin to that of the first proc."}}