Closed Dan503 closed 2 years ago
That comment isn't md standard. Change your comment to this
Name of something.
See [documentation](1) for more details.
# 1: https://www.documentation.com
Are you sure?
Your syntax appears to be the non-standard one to me.
https://www.markdownguide.org/basic-syntax/#reference-style-links
Or if there is a flavour of markdown that works with your style, you should also support this style.
GitHub's comment is markdown, you can test your link with github
It is hard to support Reference-style Links
. But I will work on it.
This is a test link to test it works in GitHub
This is a [test link][1] to test it works in GitHub
[1]: https://www.google.com/
Ok,
That is a [test link](https://www.google.com/)
to test it works in GitHub
is correct, and work in GitHub but
This is a [test link][1]
to test it works in GitHub
not working
My comment here proves that it is accepted by GitHub.
https://github.com/hosseinmd/prettier-plugin-jsdoc/issues/158#issuecomment-1083796423
It is a reference-link-only syntax. [test link][1]
on it's own doesn't work without a reference.
If you copy the sample text I posted in that comment you will see that GitHub does understand it.
Fixed: v0.3.35
Thank you.
I installed v0.3.35 into my project.
It isn't quite providing the correct output.
input
/**
* This is a [link][1] test.
*
* [1]: https://www.google.com/
*
* @param value - Any value you want
*/
function test(value) {
return true
}
current output
/**
* This is a [link][1] test.
*
* [1]: [https://www.google.com/]
*
* @param value - Any value you want
*/
function test(value) {
return true
}
expected output
/**
* This is a [link][1] test.
*
* [1]: https://www.google.com/
*
* @param value - Any value you want
*/
function test(value) {
return true
}
Notice that it is adding square brackets around the URL.
Also every time you save, it adds more and more brackets.
// save 1
* [1]: [https://www.google.com/]
// save 2
* [1]: [[https://www.google.com/]]
// save 3
* [1]: [[[https://www.google.com/]]]
There shouldn't be any brackets, the brackets are breaking the link.
HOWEVER
When I hover over the generated link in VS code, VS code seems to be interpreting it as a link to a local file.
So on top of the expectation above, this also needs to be considered:
input
/**
* This is a [link][1] test.
*
* [1]: [local/path/to/file.js]
*
* @param value - Any value you want
*/
function test(value) {
return true
}
current output
/**
* This is a [link][1] test.
*
* [1]: [[local/path/to/file.js]]
*
* @param value - Any value you want
*/
function test(value) {
return true
}
expected output
/**
* This is a [link][1] test.
*
* [1]: [local/path/to/file.js]
*
* @param value - Any value you want
*/
function test(value) {
return true
}
Fixed v0.3.36
I recently upgraded from
v0.3.12
tov0.3.33
.In one of the versions after
v0.3.12
it has started removing the markdown links in my Type-Doc comments :(Input
Output (Unwanted removal of link markdown)
The output should be retaining the markdown link.