Skip to content

Commit

Permalink
fix: Escape inherited types (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Apr 25, 2021
1 parent 4975d79 commit 34c5e7b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { SignatureReflection } from 'typedoc';
import { ArrayType, ReferenceType } from 'typedoc/dist/lib/models/types';

import MarkdownTheme from '../../theme';
import { escape } from './escape';

export function typeAndParent(this: ArrayType | ReferenceType) {
if (this) {
if ("elementType" in this) {
if ('elementType' in this) {
return typeAndParent.call(this.elementType) + '[]';
} else {
if (this.reflection) {
Expand Down Expand Up @@ -53,7 +54,7 @@ export function typeAndParent(this: ArrayType | ReferenceType) {
}
return md.join('.');
} else {
return this.toString();
return escape(this.toString());
}
}
}
Expand Down

0 comments on commit 34c5e7b

Please sign in to comment.