jsduck icon indicating copy to clipboard operation
jsduck copied to clipboard

{@link} cannot be escaped in code sample

Open Reinmar opened this issue 11 years ago • 1 comments

Hi,

I want to create a guide which describes how the {@link} tag should be used in doc strings, so I have code samples which look like this:

/**
 * Foo {@link Foo} foo.
 */

Unfortunately JSDuck parses those {@link} tags. I tried to escape them but with no luck, because it's a code sample, so all tricks were visible.

Real case: https://github.com/ckeditor/ckeditor-docs/blob/master/guides/dev/code_documentation/README.md

Reinmar avatar Feb 06 '14 09:02 Reinmar

Yeah... that's a larger issue with the whole escaping thing... or more the lack of ability to escape tags. There's simply no support for escaping in JSDuck.

Or with code samples the support for {@link} tags is actually intentional, because of backwards-compatibility with old ext-doc and with old ExtJS sources, which intentinally use the {@link} tags inside code examples to link the class names and methods used in there.

However, these old code-examples are created by wrapping inside <pre> instead of indenting, so JSDuck could treat them differently.

nene avatar Feb 06 '14 09:02 nene