definitelytyped-firefox-webext-browser icon indicating copy to clipboard operation
definitelytyped-firefox-webext-browser copied to clipboard

output code reference links

Open ghost opened this issue 7 years ago • 4 comments

from https://github.com/bomjacob/definitelytyped-firefox-webext-browser/pull/3#issuecomment-350572602

some of the documentation has code links like The $(ref:runtime.onConnect) event is fired [...], but currently they're just turned into inline code

is there a standard code link format that they could be converted to? preferably one with editor support

ghost avatar Dec 10 '17 22:12 ghost

vscode issue: https://github.com/Microsoft/vscode/issues/8223

it mentions this format:

/**
 * Represents an editor that is attached to a [document](#TextDocument).
 */

does that work in webstorm?

ghost avatar Dec 10 '17 22:12 ghost

Hmm, no that doesn't seem to work either. The only things I've found working is {@link runtime.onConnect} and other things at jsdoc documentation how do those show in vscode?

jsmnbom avatar Dec 11 '17 07:12 jsmnbom

how do those show in vscode?

all of them just display as text

maybe i'm biased since i use vscode myself but i think vscode might be popular among typescript users since it's also by microsoft, so it's possible that the links would be broken for the majority of users

i'm not too against converting the code links to that format but that ^ thing just bothers me a little

ghost avatar Dec 11 '17 23:12 ghost

Hmm, I just ran a check on the DefinitelyTyped repository, and it seems the {@link thing} styles are used a total of 30333 times, while the (thing)[thing] is only used 3014. That alone is enough in my opinion to use the first style. That being said, it would be incredibly nice if we could get it to work in vscode too (actually it's kinda odd that vscode doesn't support the {@link} style, could it be a setting somewhere?).

jsmnbom avatar Dec 12 '17 19:12 jsmnbom