Skip to content

Commit

Permalink
fix: Prevent escape of angle brackets in toc (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Nov 6, 2023
1 parent bb7717a commit 9b701be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as Handlebars from 'handlebars';
import { ContainerReflection, ReflectionKind } from 'typedoc';
import { PageEvent } from 'typedoc/dist/lib/output/events';
import { escapeChars } from '../../utils';

export default function () {
Handlebars.registerHelper(
Expand All @@ -14,14 +15,14 @@ export default function () {
if (this.model.parent.parent.parent) {
title.push(
`[${
this.model.parent.parent.name
escapeChars(this.model.parent.parent.name)
}](${Handlebars.helpers.relativeURL(
this.model?.parent?.parent.url,
)})`,
);
}
title.push(
`[${this.model.parent.name}](${Handlebars.helpers.relativeURL(
`[${escapeChars(this.model.parent.name)}](${Handlebars.helpers.relativeURL(
this.model.parent.url,
)})`,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ toc }}
{{{ toc }}}

{{> members}}

0 comments on commit 9b701be

Please sign in to comment.