{"action":"created","issue":{"url":"https://api.github.com/repos/jgm/pandoc/issues/1977","labels_url":"https://api.github.com/repos/jgm/pandoc/issues/1977/labels{/name}","comments_url":"https://api.github.com/repos/jgm/pandoc/issues/1977/comments","events_url":"https://api.github.com/repos/jgm/pandoc/issues/1977/events","html_url":"https://github.com/jgm/pandoc/issues/1977","id":59300464,"number":1977,"title":"Request for markdown writer to support output of shortcut reference links","user":{"login":"binaryphile","id":174352,"avatar_url":"https://avatars.githubusercontent.com/u/174352?v=3","gravatar_id":"","url":"https://api.github.com/users/binaryphile","html_url":"https://github.com/binaryphile","followers_url":"https://api.github.com/users/binaryphile/followers","following_url":"https://api.github.com/users/binaryphile/following{/other_user}","gists_url":"https://api.github.com/users/binaryphile/gists{/gist_id}","starred_url":"https://api.github.com/users/binaryphile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaryphile/subscriptions","organizations_url":"https://api.github.com/users/binaryphile/orgs","repos_url":"https://api.github.com/users/binaryphile/repos","events_url":"https://api.github.com/users/binaryphile/events{/privacy}","received_events_url":"https://api.github.com/users/binaryphile/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jgm/pandoc/labels/enhancement","name":"enhancement","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2015-02-27T21:58:51Z","updated_at":"2015-03-02T23:05:09Z","closed_at":null,"body":"There is an existing option for outputting reference links, --reference-links.  However, it only generates [collapsed reference links](http://spec.commonmark.org/0.17/#collapsed-reference-link).\r\n\r\nI would like to be able to generate shortcut reference links which do not include the empty trailing square brackets [].  To my eyes the empty brackets are visual clutter and unnecessary.\r\n\r\nCould there be a separate command-line switch which adds support for [shortcut reference links](http://spec.commonmark.org/0.17/#shortcut-reference-link)?  Such an option might be --shortcut-reference-links.\r\n\r\nThanks for any consideration."},"comment":{"url":"https://api.github.com/repos/jgm/pandoc/issues/comments/76847001","html_url":"https://github.com/jgm/pandoc/issues/1977#issuecomment-76847001","issue_url":"https://api.github.com/repos/jgm/pandoc/issues/1977","id":76847001,"user":{"login":"jgm","id":3044,"avatar_url":"https://avatars.githubusercontent.com/u/3044?v=3","gravatar_id":"","url":"https://api.github.com/users/jgm","html_url":"https://github.com/jgm","followers_url":"https://api.github.com/users/jgm/followers","following_url":"https://api.github.com/users/jgm/following{/other_user}","gists_url":"https://api.github.com/users/jgm/gists{/gist_id}","starred_url":"https://api.github.com/users/jgm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgm/subscriptions","organizations_url":"https://api.github.com/users/jgm/orgs","repos_url":"https://api.github.com/users/jgm/repos","events_url":"https://api.github.com/users/jgm/events{/privacy}","received_events_url":"https://api.github.com/users/jgm/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T23:05:09Z","updated_at":"2015-03-02T23:05:09Z","body":"+++ W. Caleb McDaniel [Mar 02 15 14:48 ]:\n>   @jgm PS the problem I was running into was cases where a reference link\n>   is used multiple times, in which case that label gets put in later.\n>   That would then render the raw brackets added via pattern matching\n>   superfluous and wrong.\n\nAh yes, I see what you're getting at.  For example, if you convert `[foo](url) [foo](url2) [foo](url3)`, with the current writer you'll get `[foo][] [foo][1] [foo][2]`; changing this to `[foo][] [1][] [2]` would be wrong; `[foo][] [foo][1] [foo][2]` would be needed.  Well, maybe a custom rendering function is a better way to go then; the insertion of raw markdown is a bit hackish.\n\n"}}