Skip to content

Commit

Permalink
fix: Don't remove braces containing a tag
Browse files Browse the repository at this point in the history
Closes #1001

Co-Authored-By: Raynor Chen <capraynor@users.noreply.github.com>
  • Loading branch information
Gerrit0 and capraynor committed Feb 16, 2020
1 parent 91cfa1b commit eefdb2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/converter/factories/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export function parseComment(text: string, comment: Comment = new Comment()): Co
let shortText = 0;

function consumeTypeData(line: string): string {
line = line.replace(/^\{[^\}]*\}+/, '');
line = line.replace(/^\{(?!@)[^\}]*\}+/, '');
line = line.replace(/^\[[^\[][^\]]*\]+/, '');
return line.trim();
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/converter/comment/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class CommentedClass {

/** Function description
*
* @param scope Test description.
* @param scope {@link CommentedClass} Test description.
* @returns Test description.
*/
export function gh1164(scope: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/converter/comment/specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"isExported": true
},
"comment": {
"text": "Test description."
"text": "{@link CommentedClass} Test description."
},
"type": {
"type": "intrinsic",
Expand Down

0 comments on commit eefdb2c

Please sign in to comment.