Skip to content

Commit

Permalink
fix: Fix params being incorrectly escaped in list format
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Jan 31, 2024
1 parent 5b11aa4 commit 4430dac
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 53 deletions.
@@ -1,6 +1,6 @@
import { ParameterReflection, ReflectionKind } from 'typedoc';
import { MarkdownThemeRenderContext } from '../..';
import { backTicks } from '../markdown';
import { backTicks, bold } from '../markdown';
import { escapeChars } from '../utils';

export function parametersList(
Expand Down Expand Up @@ -53,7 +53,7 @@ export function parametersList(

const name = `${escapeChars(parameter.name)}${optional}`;

const identifier: string[] = [backTicks(name)];
const identifier: string[] = [bold(name)];

if (parameter.type) {
identifier.push(': ' + context.partials.someType(parameter.type));
Expand Down
Expand Up @@ -133,7 +133,7 @@ Comments for setter
#### Parameters
\`value\`: \`string\`
**value**: \`string\`
Param comments
Expand All @@ -153,7 +153,7 @@ Param comments
#### Parameters
\`x\`: \`string\`
**x**: \`string\`
#### Source
Expand Down Expand Up @@ -277,11 +277,11 @@ Comments for ClassWithConstructorOverloads
#### Parameters
\`x\`: \`number\`
**x**: \`number\`
Comments for x number
\`y\`: \`string\`
**y**: \`string\`
#### Returns
Expand All @@ -297,7 +297,7 @@ Comments for x number
#### Parameters
\`x\`: \`string\`
**x**: \`string\`
Comments for x string
Expand All @@ -315,7 +315,7 @@ Comments for x string
#### Parameters
\`s\`: \`string\`
**s**: \`string\`
#### Returns
Expand Down
Expand Up @@ -17,7 +17,7 @@ Comments for function
>
> ### Parameters
>
> • \`x\`: \`string\`
> • **x**: \`string\`
>
> ### Returns
>
Expand Down Expand Up @@ -185,7 +185,7 @@ This is a function that is assigned to a variable.
## Parameters
\`someParam\`: \`number\`
**someParam**: \`number\`
This is some numeric parameter.
Expand Down Expand Up @@ -233,27 +233,27 @@ This is a function with a parameter that has a default value.
## Parameters
\`valueA\`: \`string\`= \`'defaultValue'\`
**valueA**: \`string\`= \`'defaultValue'\`
A parameter with a default string value.
\`valueB\`: \`number\`= \`100\`
**valueB**: \`number\`= \`100\`
A parameter with a default numeric value.
\`valueC\`: \`number\`= \`Number.NaN\`
**valueC**: \`number\`= \`Number.NaN\`
A parameter with a default NaN value.
\`valueD\`: \`boolean\`= \`true\`
**valueD**: \`boolean\`= \`true\`
A parameter with a default boolean value.
\`valueE\`: \`boolean\`= \`true\`
**valueE**: \`boolean\`= \`true\`
A parameter with a default null value.
\`valueF\`: \`string\`= \`'<foo>'\`
**valueF**: \`string\`= \`'<foo>'\`
## Returns
Expand Down Expand Up @@ -312,7 +312,7 @@ This is the first signature of a function with multiple signatures.
### Parameters
\`value\`: \`string\`
**value**: \`string\`
The name value.
Expand All @@ -332,11 +332,11 @@ This is the second signature of a function with multiple signatures.
### Parameters
\`value\`: \`Object\`
**value**: \`Object\`
An object containing the name value.
\`value\\.name\`: \`string\`
**value\\.name**: \`string\`
A value of the object.
Expand Down Expand Up @@ -407,15 +407,15 @@ exports[`Function Reflection should compile function with named params: (Output
## Parameters
\`\\_\\_namedParameters\`: \`Object\`= \`{}\`
**\\_\\_namedParameters**: \`Object\`= \`{}\`
various options
\`\\_\\_namedParameters\\.bar?\`: \`number\`= \`43\`
**\\_\\_namedParameters\\.bar?**: \`number\`= \`43\`
\`\\_\\_namedParameters\\.foo?\`: \`number\`= \`42\`
**\\_\\_namedParameters\\.foo?**: \`number\`= \`42\`
\`anotherParam\`: \`string\`
**anotherParam**: \`string\`
Another param comment
Expand Down Expand Up @@ -464,29 +464,29 @@ Some nested params.
## Parameters
\`params\`: \`Object\`
**params**: \`Object\`
The parameters passed to the method.
\`params\\.name\`: \`string\`
**params\\.name**: \`string\`
The name of the new group.
\`params\\.nestedObj\`: \`Object\`
**params\\.nestedObj**: \`Object\`
A nested object.
\`params\\.nestedObj\\.name\`: \`string\`
**params\\.nestedObj\\.name**: \`string\`
\`params\\.nestedObj\\.obj\`: \`Object\`
**params\\.nestedObj\\.obj**: \`Object\`
\`params\\.nestedObj\\.obj\\.name\`: () => \`void\`
**params\\.nestedObj\\.obj\\.name**: () => \`void\`
\`params\\.nestedObj\\.value\`: \`number\`
**params\\.nestedObj\\.value**: \`number\`
\`params\\.parent?\`: \`number\`
**params\\.parent?**: \`number\`
\`context\`: \`any\`
**context**: \`any\`
The context of the method call.
Expand Down Expand Up @@ -542,17 +542,17 @@ This is a function with a parameters.
## Parameters
\`firstParamWithDefault\`: \`boolean\`= \`true\`
**firstParamWithDefault**: \`boolean\`= \`true\`
\`requiredParam\`: \`string\`
**requiredParam**: \`string\`
A normal parameter.
\`optionalParam?\`: \`string\`
**optionalParam?**: \`string\`
An optional parameter.
\`paramWithDefault?\`: \`number\`= \`0\`
**paramWithDefault?**: \`number\`= \`0\`
## Returns
Expand All @@ -573,17 +573,17 @@ This is a function with a parameters.
## Parameters
\`firstParamWithDefault\`: \`boolean\`= \`true\`
**firstParamWithDefault**: \`boolean\`= \`true\`
\`requiredParam\`: \`string\`
**requiredParam**: \`string\`
A normal parameter.
\`optionalParam?\`: \`string\`
**optionalParam?**: \`string\`
An optional parameter.
\`paramWithDefault?\`: \`number\`= \`0\`
**paramWithDefault?**: \`number\`= \`0\`
## Returns
Expand Down
Expand Up @@ -37,7 +37,7 @@ Comments for functionProper
#### Parameters
\`s\`: \`string\`
**s**: \`string\`
Comment for param s
Expand Down Expand Up @@ -295,7 +295,7 @@ Comments for functionProper
#### Parameters
\`s\`: \`string\`
**s**: \`string\`
Comment for param s
Expand Down Expand Up @@ -608,7 +608,7 @@ Description for event someEvent
#### Parameters
\`eventParam\`: [\`CustomEventInterface\`](CustomEventInterface.md)\\<\`MouseEvent\`\\>
**eventParam**: [\`CustomEventInterface\`](CustomEventInterface.md)\\<\`MouseEvent\`\\>
Comments for param eventParam
Expand Down
Expand Up @@ -135,7 +135,7 @@ comment for y.z
#### Parameters
\`x\`: \`string\`
**x**: \`string\`
#### Returns
Expand All @@ -147,7 +147,7 @@ comment for y.z
#### Parameters
\`x\`: \`string\`
**x**: \`string\`
#### Returns
Expand All @@ -165,7 +165,7 @@ Comments for accessorA setter
#### Parameters
\`x\`: [\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\`string\`\\>
**x**: [\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\`string\`\\>
#### Returns
Expand All @@ -179,7 +179,7 @@ Comments for accessorA setter
#### Parameters
\`x\`: \`string\`
**x**: \`string\`
#### Returns
Expand All @@ -191,7 +191,7 @@ Comments for someFunction
#### Parameters
\`param\`: \`string\`
**param**: \`string\`
#### Returns
Expand Down Expand Up @@ -282,9 +282,9 @@ Comments for FunctionType
## Parameters
\`name\`: \`string\`
**name**: \`string\`
\`value\`: \`unknown\`
**value**: \`unknown\`
## Returns
Expand Down
Expand Up @@ -169,7 +169,7 @@ Comments for objectLiteralVariable
#### Parameters
\`z\`: \`string\`
**z**: \`string\`
#### Returns
Expand Down Expand Up @@ -206,9 +206,9 @@ Comments for objectLiteralVariable
#### Parameters
\`unionParam\`: \`"a"\` \\| \`"b"\`
**unionParam**: \`"a"\` \\| \`"b"\`
\`\\_undercoreParam\\_\`: \`string\`
**\\_undercoreParam\\_**: \`string\`
#### Returns
Expand Down

0 comments on commit 4430dac

Please sign in to comment.