Skip to content

Commit

Permalink
fix: Fix string escape inside backticks
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Jun 24, 2021
1 parent d36901a commit 3b8ab18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Expand Up @@ -4,7 +4,6 @@ import {
ReflectionKind,
ReflectionType,
} from 'typedoc/dist/lib/models';

import { escape } from './escape';
import { memberSymbol } from './member-symbol';
import { stripComments } from './strip-comments';
Expand Down Expand Up @@ -36,9 +35,7 @@ export function declarationTitle(
this.defaultValue &&
this.defaultValue !== '...'
) {
md.push(
` = \`${stripLineBreaks(escape(stripComments(this.defaultValue)))}\``,
);
md.push(` = \`${stripLineBreaks(stripComments(this.defaultValue))}\``);
}
return md.join('');
}
Expand Down
Expand Up @@ -17,7 +17,6 @@ import {
UnionType,
UnknownType,
} from 'typedoc/dist/lib/models/types';

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

Expand Down Expand Up @@ -202,7 +201,7 @@ function getReferenceType(model: ReferenceType, emphasis) {
}
return reflection.join('');
}
return emphasis ? `\`${escape(model.name)}\`` : escape(model.name);
return emphasis ? `\`${model.name}\`` : escape(model.name);
}

function getArrayType(model: ArrayType, emphasis: boolean) {
Expand All @@ -229,7 +228,7 @@ function getTupleType(model: TupleType) {
}

function getIntrinsicType(model: IntrinsicType, emphasis: boolean) {
return emphasis ? `\`${escape(model.name)}\`` : escape(model.name);
return emphasis ? `\`${model.name}\`` : escape(model.name);
}

function getTypeOperatorType(model: TypeOperatorType) {
Expand Down

0 comments on commit 3b8ab18

Please sign in to comment.