',
};
+
+/**
+ * ```ts
+ * reallyUgly (
+ * javascript
+ * )
+ * ```
+ *
+ * ```ts
+ * const originalSingleQuote = 'hello'
+ * const originalDoubleQuote = "hello"
+ * ```
+ *
+ *```css
+ *.h1 { color : red }
+ *```
+ */
+export function some_prettier_function(param: string) {
+ return param;
+}
diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.class.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.class.spec.ts.snap
index ef8c883db..2546f9a5d 100644
--- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.class.spec.ts.snap
+++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.class.spec.ts.snap
@@ -1238,15 +1238,21 @@ Comments for ClassWithTypeParameters
## Type Parameters
-• **A**
+### A
-Comments for param A
+\\-
-• **B** *extends* \`string\`
+### B
+
+*extends*: \`string\`
Comments for param B
-• **C** = \`boolean\`
+### C
+
+Default type \`boolean\`
+
+Comments for param C
## Constructors
@@ -1269,9 +1275,9 @@ Comments for ClassWithTypeParameters
| Type Parameter | Default type | Description |
| :------ | :------ | :------ |
-| \`A\` | - | Comments for param A |
+| \`A\` | - | - |
| \`B\` *extends* \`string\` | - | Comments for param B |
-| \`C\` | \`boolean\` | - |
+| \`C\` | \`boolean\` | Comments for param C |
## Constructors
diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.function.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.function.spec.ts.snap
index e1ffdc188..2560502f0 100644
--- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.function.spec.ts.snap
+++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.function.spec.ts.snap
@@ -23,7 +23,9 @@ Comments for current function 1
#### Type Parameters
-• **Value**
+##### Value
+
+\\-
#### Parameters
@@ -47,7 +49,9 @@ Comments for iterable arg
### Type Parameters
-• **Value**
+#### Value
+
+\\-
### Parameters
@@ -154,7 +158,9 @@ Comments for function
### Type Parameters
-• **T**
+#### T
+
+\\-
### Parameters
@@ -1161,11 +1167,13 @@ Function with type parameters
## Type Parameters
-• **T**
+### T
Comments for T
-• **Item** = \`string\` \\| \`boolean\`
+### Item
+
+Default type \`string\` \\| \`boolean\`
## Returns
diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.interface.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.interface.spec.ts.snap
index a1554e63e..09226a588 100644
--- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.interface.spec.ts.snap
+++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.interface.spec.ts.snap
@@ -641,22 +641,22 @@ And some more comments
## Type Parameters
-• **A**
+### A
This is a parameter.
-• **B**
+### B
Comments for a parameter.
This sentence is on a soft new line.
-• **C**
+### C
This is a parameter.
Documentation with a double line
-• **D**
+### D
These are comments with paras
These are comments with paras
@@ -842,7 +842,9 @@ Comments for InterfaceWithTypeParameters
## Type Parameters
-• **A**
+### A
+
+\\-
## Properties
diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.type-alias.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.type-alias.spec.ts.snap
index 695eada1f..02ea350fd 100644
--- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.type-alias.spec.ts.snap
+++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.type-alias.spec.ts.snap
@@ -37,7 +37,9 @@ Comments for ConditionalType
## Type Parameters
-• **T**
+### T
+
+\\-
## Source
@@ -429,7 +431,9 @@ Comments for PartialMappedType
## Type Parameters
-• **T**
+### T
+
+\\-
## Source
@@ -523,7 +527,9 @@ Comments for ReadonlyMapedType
## Type Parameters
-• **T**
+### T
+
+\\-
## Source
@@ -623,9 +629,13 @@ Comments for TypeWithTypeParams
## Type Parameters
-• **T**
+### T
+
+\\-
+
+### R
-• **R**
+\\-
## Source
diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/utils.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/utils.spec.ts.snap
index 1056e12d9..ae30741fd 100644
--- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/utils.spec.ts.snap
+++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/utils.spec.ts.snap
@@ -5,7 +5,9 @@ exports[`Utils should get class with brackets: (Output File Strategy "members")
## Type Parameters
-• **T**
+| Type Parameter |
+| ------ |
+| \`T\` |
## Constructors
@@ -30,7 +32,9 @@ exports[`Utils should get class with brackets: (Output File Strategy "members")
## Type Parameters
-• **T**
+| Type Parameter |
+| -------------- |
+| \`T\` |
## Constructors
@@ -59,7 +63,9 @@ exports[`Utils should get interface with brackets: (Output File Strategy "member
## Type Parameters
-• **T**
+| Type Parameter |
+| ------ |
+| \`T\` |
## Properties
@@ -92,7 +98,9 @@ exports[`Utils should get interface with brackets: (Output File Strategy "member
## Type Parameters
-• **T**
+| Type Parameter |
+| -------------- |
+| \`T\` |
## Properties
@@ -102,7 +110,7 @@ exports[`Utils should get interface with brackets: (Output File Strategy "member
<: string;
\`\`\`
-***
+---
### <tag>
@@ -110,7 +118,7 @@ exports[`Utils should get interface with brackets: (Output File Strategy "member
: string;
\`\`\`
-***
+---
### >
@@ -118,7 +126,7 @@ exports[`Utils should get interface with brackets: (Output File Strategy "member
>: string;
\`\`\`
-***
+---
### prop
@@ -128,6 +136,72 @@ prop: T;
"
`;
+exports[`Utils should get prettified function: (Output File Strategy "members") (Option Group "1") 1`] = `
+"# Function: some\\_prettier\\_function()
+
+> **some\\_prettier\\_function**(\`param\`): \`string\`
+
+\`\`\`ts
+reallyUgly (
+javascript
+ )
+\`\`\`
+
+\`\`\`ts
+const originalSingleQuote = 'hello'
+const originalDoubleQuote = "hello"
+\`\`\`
+
+\`\`\`css
+.h1 { color : red }
+\`\`\`
+
+## Parameters
+
+| Parameter | Type |
+| ------ | ------ |
+| \`param\` | \`string\` |
+
+## Returns
+
+\`string\`
+"
+`;
+
+exports[`Utils should get prettified function: (Output File Strategy "members") (Option Group "2") 1`] = `
+"# Function: some_prettier_function()
+
+\`\`\`ts
+function some_prettier_function(param): string;
+\`\`\`
+
+\`\`\`ts
+reallyUgly(javascript);
+\`\`\`
+
+\`\`\`ts
+const originalSingleQuote = "hello";
+const originalDoubleQuote = "hello";
+\`\`\`
+
+\`\`\`css
+.h1 {
+ color: red;
+}
+\`\`\`
+
+## Parameters
+
+| Parameter | Type |
+| --------- | -------- |
+| \`param\` | \`string\` |
+
+## Returns
+
+\`string\`
+"
+`;
+
exports[`Utils should get variable with brackets: (Output File Strategy "members") (Option Group "1") 1`] = `
"# Variable: variableWithChars
diff --git a/packages/typedoc-plugin-markdown/test/specs/utils.spec.ts b/packages/typedoc-plugin-markdown/test/specs/utils.spec.ts
index ea8c4e723..01dd9bdae 100644
--- a/packages/typedoc-plugin-markdown/test/specs/utils.spec.ts
+++ b/packages/typedoc-plugin-markdown/test/specs/utils.spec.ts
@@ -12,4 +12,12 @@ describe(`Utils`, () => {
test(`should get variable with brackets`, () => {
expectFileToEqual('utils', 'members', 'variables/variableWithChars.md');
});
+
+ test(`should get prettified function`, () => {
+ expectFileToEqual(
+ 'utils',
+ 'members',
+ 'functions/some_prettier_function.md',
+ );
+ });
});
diff --git a/packages/typedoc-plugin-remark/test/specs/__snapshots__/remark.spec.ts.snap b/packages/typedoc-plugin-remark/test/specs/__snapshots__/remark.spec.ts.snap
index a0be93a33..eaa5873ff 100644
--- a/packages/typedoc-plugin-remark/test/specs/__snapshots__/remark.spec.ts.snap
+++ b/packages/typedoc-plugin-remark/test/specs/__snapshots__/remark.spec.ts.snap
@@ -5,10 +5,10 @@ exports[`Remark should parse globals page 1`] = `
## CustomTOC
-- [Variables](#variables)
- - [someVariable](#somevariable)
-- [Functions](#functions)
- - [some_function()](#some_function)
+* [Variables](#variables)
+ * [someVariable](#somevariable)
+* [Functions](#functions)
+ * [some\\_function()](#some_function)
## Variables
@@ -18,12 +18,11 @@ exports[`Remark should parse globals page 1`] = `
## Functions
-### some_function()
+### some\\_function()
-> **some_function**(\`param\`): \`void\`
+> **some\\_function**(\`param\`): \`void\`
#### Parameters
-
@@ -48,10 +47,6 @@ exports[`Remark should parse globals page 1`] = `
Default text content for \`@category\` tag.
-\`\`\`ts
-const x = 1;
-\`\`\`
-
@@ -74,12 +69,11 @@ exports[`Remark should parse globals page without toc 1`] = `
## Functions
-### some_function()
+### some\\_function()
-> **some_function**(\`param\`): \`void\`
+> **some\\_function**(\`param\`): \`void\`
#### Parameters
-
@@ -104,10 +98,6 @@ exports[`Remark should parse globals page without toc 1`] = `
Default text content for \`@category\` tag.
-\`\`\`ts
-const x = 1;
-\`\`\`
-
@@ -121,23 +111,22 @@ const x = 1;
exports[`Remark should parse members class page 1`] = `
"---
-title: 'test'
+title: "test"
---
# Class: SomeClass\\
-- list item 1
+* list item 1
## Contents
-- [Type Parameters](#type-parameters)
-- [Constructors](#constructors)
- - [Constructor](#constructor)
-- [Properties](#properties)
- - [someProp](#someprop)
+* [Type Parameters](#type-parameters)
+* [Constructors](#constructors)
+ * [Constructor](#constructor)
+* [Properties](#properties)
+ * [someProp](#someprop)
## Type Parameters
-
@@ -178,14 +167,14 @@ exports[`Remark should parse members index 1`] = `
## Modules
-- [module-1](module-1/README.md)
-- [module-2](module-2/README.md)
+* [module-1](module-1/README.md)
+* [module-2](module-2/README.md)
"
`;
exports[`Remark should parse members module page 1`] = `
"---
-title: 'test'
+title: "test"
---
# module-1
@@ -194,33 +183,19 @@ Comments form module comments
Thanks [**@tgrey**](https://github.com/tgrey) please see issue [#1](https://github.com/typedoc2md/typedoc-plugin-markdown/issues/1).
-\`\`\`js
-reallyUgly(javascript);
-\`\`\`
-
-\`\`\`css
-.h1 {
- color: red;
-}
-\`\`\`
-
## Index
### Classes
-- [SomeClass](classes/SomeClass.md)
+* [SomeClass](classes/SomeClass.md)
### Interfaces
-- [SomeInterface](interfaces/SomeInterface.md)
-
-### Variables
-
-- [\\_\\_variable_with_underscores\\_\\_](variables/variable_with_underscores.md)
+* [SomeInterface](interfaces/SomeInterface.md)
### Functions
-- [some_function](functions/some_function.md)
+* [some\\_function](functions/some_function.md)
"
`;
@@ -245,24 +220,12 @@ Comments form module comments
Thanks [**@tgrey**](https://github.com/tgrey) please see issue [#1](https://github.com/typedoc2md/typedoc-plugin-markdown/issues/1).
-~~~js
-reallyUgly (
-javascript
- )
-~~~
-
-~~~css
-.h1 { color : red }
-~~~
-
## Contents
+ [Classes](#classes)
+ [SomeClass\\](#someclasst)
+ [Interfaces](#interfaces)
+ [SomeInterface\\](#someinterfacet)
-+ [Variables](#variables)
- + [\\_\\_variable\\_with\\_underscores\\_\\_](#__variable_with_underscores__)
+ [Functions](#functions)
+ [some\\_function()](#some_function)
@@ -342,12 +305,6 @@ javascript
> **someProp**: \`string\`
-## Variables
-
-### \\_\\_variable\\_with\\_underscores\\_\\_
-
-> \`const\` **\\_\\_variable\\_with\\_underscores\\_\\_**: \`true\` = \`true\`
-
## Functions
### some\\_function()
diff --git a/packages/typedoc-plugin-remark/test/stubs/module-1.ts b/packages/typedoc-plugin-remark/test/stubs/module-1.ts
index 766cf8fbe..bdc8c11c9 100644
--- a/packages/typedoc-plugin-remark/test/stubs/module-1.ts
+++ b/packages/typedoc-plugin-remark/test/stubs/module-1.ts
@@ -3,20 +3,9 @@
*
* Thanks \@tgrey please see issue #1.
*
- * ```js
- * reallyUgly (
- * javascript
- * )
- * ```
- *
- *```css
- *.h1 { color : red }
- *```
- *
* @module
*/
-export const __variable_with_underscores__ = true;
export function some_function(param: string | boolean) {}
export interface SomeInterface {
diff --git a/packages/typedoc-plugin-remark/test/stubs/module-2.ts b/packages/typedoc-plugin-remark/test/stubs/module-2.ts
index be9f350d5..6ffa568df 100644
--- a/packages/typedoc-plugin-remark/test/stubs/module-2.ts
+++ b/packages/typedoc-plugin-remark/test/stubs/module-2.ts
@@ -5,8 +5,5 @@ export const someVariable = true;
*
* Default text content for `@category` tag.
*
- * ```ts
- * const x = 1;
- * ```
*/
export function some_function(param: string) {}
diff --git a/packages/typedoc-plugin-remark/test/typedoc.globals-notoc.json b/packages/typedoc-plugin-remark/test/typedoc.globals-notoc.json
index 992196a6c..cf470b674 100644
--- a/packages/typedoc-plugin-remark/test/typedoc.globals-notoc.json
+++ b/packages/typedoc-plugin-remark/test/typedoc.globals-notoc.json
@@ -2,5 +2,5 @@
"extends": "./typedoc.base.json",
"entryPoints": ["./stubs/module-2.ts"],
"outputFileStrategy": "modules",
- "remarkPlugins": ["remark-github", "unified-prettier"]
+ "remarkPlugins": ["remark-github"]
}
diff --git a/packages/typedoc-plugin-remark/test/typedoc.globals.json b/packages/typedoc-plugin-remark/test/typedoc.globals.json
index db7fa5a23..0fa17e2a6 100644
--- a/packages/typedoc-plugin-remark/test/typedoc.globals.json
+++ b/packages/typedoc-plugin-remark/test/typedoc.globals.json
@@ -4,7 +4,6 @@
"outputFileStrategy": "modules",
"remarkPlugins": [
"remark-github",
- "unified-prettier",
["remark-toc", { "maxDepth": 3, "heading": "CustomTOC" }]
]
}
diff --git a/packages/typedoc-plugin-remark/test/typedoc.members.json b/packages/typedoc-plugin-remark/test/typedoc.members.json
index 78da92345..ef7838133 100644
--- a/packages/typedoc-plugin-remark/test/typedoc.members.json
+++ b/packages/typedoc-plugin-remark/test/typedoc.members.json
@@ -1,9 +1,5 @@
{
"extends": "./typedoc.base.json",
"entryPoints": ["./stubs/*.ts"],
- "remarkPlugins": [
- "remark-github",
- "unified-prettier",
- ["remark-toc", { "maxDepth": 3 }]
- ]
+ "remarkPlugins": ["remark-github", ["remark-toc", { "maxDepth": 3 }]]
}