You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using jsii-docgen in json mode, multi-line @link elements are mangled.
Description
I have some documentation like the following (note the multi-line tsdoc @link in the first line):
/**
* Matches the content of a variable that comes from a state. See {@link https://case.contract-testing.io/docs/defining-contracts/state-definitions | state
* definitions}
* and {@link https://case.contract-testing.io/docs/reference/state-handlers | state handlers} for
* more details.
*
* @public
*/
export class StateVariable extends AnyMatcher {
/* ... */
}
The generated remarks section in the json doc is mangled - it assumed the first link finishes at the end of the first line, so the text link ends state} * definitions }.
Expected behaviour
The parsed link appears as:
See {@link https://case.contract-testing.io/docs/defining-contracts/state-definitions state definitions}
Actual behaviour
The link appears as
See {@link https://case.contract-testing.io/docs/defining-contracts/state-definitions state} * definitions}
Note that:
The link ends twice, once after state, and again after definitions
The * from the next line is erroneously included
Reproduction
I've created this repository illustrating this and another problem (about to be reported).
The relevant part for this issue is the parsing of this line:
/**
* This class reproduces the bugs at {@link https://github.com/cdklabs/jsii-docgen/issues/1633 | this
* issue}
Version: [email protected] (via [email protected])
Originally opened here
Summary
When using jsii-docgen in json mode, multi-line
@link
elements are mangled.Description
I have some documentation like the following (note the multi-line tsdoc
@link
in the first line):The generated
remarks
section in the json doc is mangled - it assumed the first link finishes at the end of the first line, so the text link endsstate} * definitions }
.Expected behaviour
The parsed link appears as:
Actual behaviour
The link appears as
Note that:
state
, and again afterdefinitions
*
from the next line is erroneously includedReproduction
I've created this repository illustrating this and another problem (about to be reported).
The relevant part for this issue is the parsing of this line:
Which results in this line in the assembly, which contains:
The text was updated successfully, but these errors were encountered: