{"action":"opened","number":57,"pull_request":{"url":"https://api.github.com/repos/jsdoc2md/dmd/pulls/57","id":175444563,"html_url":"https://github.com/jsdoc2md/dmd/pull/57","diff_url":"https://github.com/jsdoc2md/dmd/pull/57.diff","patch_url":"https://github.com/jsdoc2md/dmd/pull/57.patch","issue_url":"https://api.github.com/repos/jsdoc2md/dmd/issues/57","number":57,"state":"open","locked":false,"title":"Fix: Both caption and lang in example","user":{"login":"foamy-latte","id":35882542,"avatar_url":"https://avatars2.githubusercontent.com/u/35882542?v=4","gravatar_id":"","url":"https://api.github.com/users/foamy-latte","html_url":"https://github.com/foamy-latte","followers_url":"https://api.github.com/users/foamy-latte/followers","following_url":"https://api.github.com/users/foamy-latte/following{/other_user}","gists_url":"https://api.github.com/users/foamy-latte/gists{/gist_id}","starred_url":"https://api.github.com/users/foamy-latte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foamy-latte/subscriptions","organizations_url":"https://api.github.com/users/foamy-latte/orgs","repos_url":"https://api.github.com/users/foamy-latte/repos","events_url":"https://api.github.com/users/foamy-latte/events{/privacy}","received_events_url":"https://api.github.com/users/foamy-latte/received_events","type":"User","site_admin":false},"body":"## Issue\r\n\r\n`@lang` tag not processed if the `<caption>` and `@lang` tags are both included into the `@example` source directly; I assume this is not intended, as otherwise `@lang` processing would be conditionally dependent on presence of `<caption>`.\r\n\r\nThus this is a bug, and the reason is, that when `<caption>` is present, the `example` has first line removed, and processing is continued for `@lang` on modified `example`, which already does not have the original line.\r\n\r\n## Goals\r\n\r\n- Keep existing behavior, as there are special cases, such as trailing commentary.\r\n- Effectively keep the design/logic.\r\n- Maintain existing coding style.\r\n- Keep changes to minimum.\r\n\r\n## Solution\r\n\r\n- Process `@lang` before `<caption>`, for the special case `<caption>@lang cmd comment</caption>`; Otherwise in such case language would be processed, but still remain within caption, which is inappropriate.\r\n- Modify the lines first, instead of example object itself, and assign the modified lines(if modification happened) to `example` after processing `<caption>` and `@lang`, as it minimizes the needed changes.\r\n\r\n## Note\r\n\r\n- There are behaviors, such as `<capt@lang cmd ion>comment</caption>`, which I did not touch due to reasons described in goals.\r\n- There is currently a workaround of using ```` ``` ```` directly in the source.","created_at":"2018-03-16T05:35:53Z","updated_at":"2018-03-16T05:35:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jsdoc2md/dmd/pulls/57/commits","review_comments_url":"https://api.github.com/repos/jsdoc2md/dmd/pulls/57/comments","review_comment_url":"https://api.github.com/repos/jsdoc2md/dmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jsdoc2md/dmd/issues/57/comments","statuses_url":"https://api.github.com/repos/jsdoc2md/dmd/statuses/7d884c6d6b1bd02b1725c372064a4c275f0c66e5","head":{"label":"cpuabuse:master","ref":"master","sha":"7d884c6d6b1bd02b1725c372064a4c275f0c66e5","user":{"login":"cpuabuse","id":36058351,"avatar_url":"https://avatars3.githubusercontent.com/u/36058351?v=4","gravatar_id":"","url":"https://api.github.com/users/cpuabuse","html_url":"https://github.com/cpuabuse","followers_url":"https://api.github.com/users/cpuabuse/followers","following_url":"https://api.github.com/users/cpuabuse/following{/other_user}","gists_url":"https://api.github.com/users/cpuabuse/gists{/gist_id}","starred_url":"https://api.github.com/users/cpuabuse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpuabuse/subscriptions","organizations_url":"https://api.github.com/users/cpuabuse/orgs","repos_url":"https://api.github.com/users/cpuabuse/repos","events_url":"https://api.github.com/users/cpuabuse/events{/privacy}","received_events_url":"https://api.github.com/users/cpuabuse/received_events","type":"Organization","site_admin":false},"repo":{"id":125459502,"name":"dmd","full_name":"cpuabuse/dmd","owner":{"login":"cpuabuse","id":36058351,"avatar_url":"https://avatars3.githubusercontent.com/u/36058351?v=4","gravatar_id":"","url":"https://api.github.com/users/cpuabuse","html_url":"https://github.com/cpuabuse","followers_url":"https://api.github.com/users/cpuabuse/followers","following_url":"https://api.github.com/users/cpuabuse/following{/other_user}","gists_url":"https://api.github.com/users/cpuabuse/gists{/gist_id}","starred_url":"https://api.github.com/users/cpuabuse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpuabuse/subscriptions","organizations_url":"https://api.github.com/users/cpuabuse/orgs","repos_url":"https://api.github.com/users/cpuabuse/repos","events_url":"https://api.github.com/users/cpuabuse/events{/privacy}","received_events_url":"https://api.github.com/users/cpuabuse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cpuabuse/dmd","description":"The default output template for jsdoc2md","fork":true,"url":"https://api.github.com/repos/cpuabuse/dmd","forks_url":"https://api.github.com/repos/cpuabuse/dmd/forks","keys_url":"https://api.github.com/repos/cpuabuse/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cpuabuse/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cpuabuse/dmd/teams","hooks_url":"https://api.github.com/repos/cpuabuse/dmd/hooks","issue_events_url":"https://api.github.com/repos/cpuabuse/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/cpuabuse/dmd/events","assignees_url":"https://api.github.com/repos/cpuabuse/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/cpuabuse/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/cpuabuse/dmd/tags","blobs_url":"https://api.github.com/repos/cpuabuse/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cpuabuse/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cpuabuse/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/cpuabuse/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cpuabuse/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/cpuabuse/dmd/languages","stargazers_url":"https://api.github.com/repos/cpuabuse/dmd/stargazers","contributors_url":"https://api.github.com/repos/cpuabuse/dmd/contributors","subscribers_url":"https://api.github.com/repos/cpuabuse/dmd/subscribers","subscription_url":"https://api.github.com/repos/cpuabuse/dmd/subscription","commits_url":"https://api.github.com/repos/cpuabuse/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/cpuabuse/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/cpuabuse/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/cpuabuse/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/cpuabuse/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/cpuabuse/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cpuabuse/dmd/merges","archive_url":"https://api.github.com/repos/cpuabuse/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cpuabuse/dmd/downloads","issues_url":"https://api.github.com/repos/cpuabuse/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/cpuabuse/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/cpuabuse/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/cpuabuse/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cpuabuse/dmd/labels{/name}","releases_url":"https://api.github.com/repos/cpuabuse/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/cpuabuse/dmd/deployments","created_at":"2018-03-16T03:39:02Z","updated_at":"2018-03-16T04:58:26Z","pushed_at":"2018-03-16T04:58:24Z","git_url":"git://github.com/cpuabuse/dmd.git","ssh_url":"git@github.com:cpuabuse/dmd.git","clone_url":"https://github.com/cpuabuse/dmd.git","svn_url":"https://github.com/cpuabuse/dmd","homepage":"","size":1230,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jsdoc2md:master","ref":"master","sha":"858d71dc4bba9ada519c7a7ecb34afea90c1eb57","user":{"login":"jsdoc2md","id":11700076,"avatar_url":"https://avatars2.githubusercontent.com/u/11700076?v=4","gravatar_id":"","url":"https://api.github.com/users/jsdoc2md","html_url":"https://github.com/jsdoc2md","followers_url":"https://api.github.com/users/jsdoc2md/followers","following_url":"https://api.github.com/users/jsdoc2md/following{/other_user}","gists_url":"https://api.github.com/users/jsdoc2md/gists{/gist_id}","starred_url":"https://api.github.com/users/jsdoc2md/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsdoc2md/subscriptions","organizations_url":"https://api.github.com/users/jsdoc2md/orgs","repos_url":"https://api.github.com/users/jsdoc2md/repos","events_url":"https://api.github.com/users/jsdoc2md/events{/privacy}","received_events_url":"https://api.github.com/users/jsdoc2md/received_events","type":"Organization","site_admin":false},"repo":{"id":21829394,"name":"dmd","full_name":"jsdoc2md/dmd","owner":{"login":"jsdoc2md","id":11700076,"avatar_url":"https://avatars2.githubusercontent.com/u/11700076?v=4","gravatar_id":"","url":"https://api.github.com/users/jsdoc2md","html_url":"https://github.com/jsdoc2md","followers_url":"https://api.github.com/users/jsdoc2md/followers","following_url":"https://api.github.com/users/jsdoc2md/following{/other_user}","gists_url":"https://api.github.com/users/jsdoc2md/gists{/gist_id}","starred_url":"https://api.github.com/users/jsdoc2md/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsdoc2md/subscriptions","organizations_url":"https://api.github.com/users/jsdoc2md/orgs","repos_url":"https://api.github.com/users/jsdoc2md/repos","events_url":"https://api.github.com/users/jsdoc2md/events{/privacy}","received_events_url":"https://api.github.com/users/jsdoc2md/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jsdoc2md/dmd","description":"The default output template for jsdoc2md","fork":false,"url":"https://api.github.com/repos/jsdoc2md/dmd","forks_url":"https://api.github.com/repos/jsdoc2md/dmd/forks","keys_url":"https://api.github.com/repos/jsdoc2md/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsdoc2md/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsdoc2md/dmd/teams","hooks_url":"https://api.github.com/repos/jsdoc2md/dmd/hooks","issue_events_url":"https://api.github.com/repos/jsdoc2md/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/jsdoc2md/dmd/events","assignees_url":"https://api.github.com/repos/jsdoc2md/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/jsdoc2md/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/jsdoc2md/dmd/tags","blobs_url":"https://api.github.com/repos/jsdoc2md/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsdoc2md/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsdoc2md/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsdoc2md/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsdoc2md/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/jsdoc2md/dmd/languages","stargazers_url":"https://api.github.com/repos/jsdoc2md/dmd/stargazers","contributors_url":"https://api.github.com/repos/jsdoc2md/dmd/contributors","subscribers_url":"https://api.github.com/repos/jsdoc2md/dmd/subscribers","subscription_url":"https://api.github.com/repos/jsdoc2md/dmd/subscription","commits_url":"https://api.github.com/repos/jsdoc2md/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsdoc2md/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsdoc2md/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsdoc2md/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsdoc2md/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/jsdoc2md/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsdoc2md/dmd/merges","archive_url":"https://api.github.com/repos/jsdoc2md/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsdoc2md/dmd/downloads","issues_url":"https://api.github.com/repos/jsdoc2md/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/jsdoc2md/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/jsdoc2md/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/jsdoc2md/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsdoc2md/dmd/labels{/name}","releases_url":"https://api.github.com/repos/jsdoc2md/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/jsdoc2md/dmd/deployments","created_at":"2014-07-14T17:52:32Z","updated_at":"2018-03-15T23:15:13Z","pushed_at":"2018-02-23T11:22:57Z","git_url":"git://github.com/jsdoc2md/dmd.git","ssh_url":"git@github.com:jsdoc2md/dmd.git","clone_url":"https://github.com/jsdoc2md/dmd.git","svn_url":"https://github.com/jsdoc2md/dmd","homepage":"","size":1229,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":26,"open_issues":4,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jsdoc2md/dmd/pulls/57"},"html":{"href":"https://github.com/jsdoc2md/dmd/pull/57"},"issue":{"href":"https://api.github.com/repos/jsdoc2md/dmd/issues/57"},"comments":{"href":"https://api.github.com/repos/jsdoc2md/dmd/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/jsdoc2md/dmd/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/jsdoc2md/dmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jsdoc2md/dmd/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/jsdoc2md/dmd/statuses/7d884c6d6b1bd02b1725c372064a4c275f0c66e5"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":13,"deletions":11,"changed_files":1}}
{"actor":{"display_login":"foamy-latte"}}