Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typedoc-plugin-markdown

Package Overview
Dependencies
Maintainers
1
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedoc-plugin-markdown - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

dist/index.js

@@ -50,3 +50,3 @@ "use strict";

/**
* Interate over declaration definitions and to the container.
* Iterate over declaration definitions and to the container.
*/

@@ -53,0 +53,0 @@ Object.entries(declarations).forEach(([name, declaration]) => {

@@ -13,4 +13,6 @@ "use strict";

.replace(/\|/g, '\\|')
.replace(/\[/g, '\\[')
.replace(/\]/g, '\\]')
.replace(/\*/g, '\\*');
}
exports.escapeChars = escapeChars;

@@ -10,4 +10,5 @@ "use strict";

.replace(/\`\`\`/g, '`')
.replace(/\n/g, '');
.replace(/\n/g, '')
.replace(/(<br \/>\s*)+$/g, '');
}
exports.formatTableColumn = formatTableColumn;

@@ -143,3 +143,3 @@ import { DeclarationOption } from 'typedoc';

*
* This option will remove reference to `@scope` in the path when generating files and directories. It does not effect the name of the package or module in the output.
* This option will remove reference to `@scope` in the path when generating files and directories. It does not affect the name of the package or module in the output.
*

@@ -297,3 +297,3 @@ * The following will be the directory structure for packages named `@scope/package-1` and `@scope/package-2`:

/**
* *Please note this options does not effect the rendering of inline code or code blocks (using single/triple backticks).*
* *Please note this options does not affect the rendering of inline code or code blocks (using single/triple backticks).*
*

@@ -300,0 +300,0 @@ * By default all comments written inside JsDoc comments will be passed to the output as written, and parsers will interpret un-escaped angle brackets as HTML/JSX tags..

@@ -184,3 +184,3 @@ "use strict";

*
* This option will remove reference to `@scope` in the path when generating files and directories. It does not effect the name of the package or module in the output.
* This option will remove reference to `@scope` in the path when generating files and directories. It does not affect the name of the package or module in the output.
*

@@ -420,3 +420,3 @@ * The following will be the directory structure for packages named `@scope/package-1` and `@scope/package-2`:

/**
* *Please note this options does not effect the rendering of inline code or code blocks (using single/triple backticks).*
* *Please note this options does not affect the rendering of inline code or code blocks (using single/triple backticks).*
*

@@ -423,0 +423,0 @@ * By default all comments written inside JsDoc comments will be passed to the output as written, and parsers will interpret un-escaped angle brackets as HTML/JSX tags..

@@ -23,3 +23,22 @@ "use strict";

if (opts.showTags && model.blockTags?.length) {
const tags = model.blockTags
const blockTags = model.blockTags.reduce((previous, current) => {
if (current.tag === '@example') {
const prevExampleTag = previous.find((tag) => ['@example', '@examples'].includes(tag.tag));
if (prevExampleTag) {
return previous.map((prevTag) => {
if (prevTag === prevExampleTag) {
current.content.unshift({ kind: 'text', text: '\n\n' });
return {
...prevTag,
tag: '@examples',
content: [...prevTag.content, ...current.content],
};
}
return prevTag;
});
}
}
return [...previous, current];
}, []);
const tags = blockTags
.filter((tag) => tag.tag !== '@returns')

@@ -26,0 +45,0 @@ .filter((tag) => !opts.isTableColumn ||

@@ -10,29 +10,35 @@ "use strict";

const md = [];
const parent = !model.isTarget
? model.types
.map((hierarchyType) => {
return this.helpers.getHierarchyType(hierarchyType, {
isTarget: model.isTarget || false,
});
})
.join('.')
: null;
if (model.next) {
if (parent) {
md.push((0, markdown_1.heading)(options.headingLevel, this.getText('label.extends')));
md.push(`- ${parent}`);
const getHierarchy = (hModel) => {
const parent = !hModel.isTarget
? hModel.types
.map((hierarchyType) => {
return this.helpers.getHierarchyType(hierarchyType, {
isTarget: hModel.isTarget || false,
});
})
.join('.')
: null;
if (hModel.next) {
if (parent) {
md.push((0, markdown_1.heading)(options.headingLevel, this.getText('label.extends')));
md.push(`- ${parent}`);
}
else {
md.push((0, markdown_1.heading)(options.headingLevel, this.getText('label.extendedBy')));
const lines = [];
hModel.next.types.forEach((hierarchyType) => {
lines.push(this.helpers.getHierarchyType(hierarchyType, {
isTarget: hModel.next?.isTarget || false,
}));
});
md.push((0, markdown_1.unorderedList)(lines));
}
if (hModel.next?.next) {
getHierarchy(hModel.next);
}
}
else {
md.push((0, markdown_1.heading)(options.headingLevel, this.getText('label.extendedBy')));
const lines = [];
model.next.types.forEach((hierarchyType) => {
lines.push(this.helpers.getHierarchyType(hierarchyType, {
isTarget: model.next?.isTarget || false,
}));
});
md.push((0, markdown_1.unorderedList)(lines));
}
}
};
getHierarchy(model);
return md.join('\n\n');
}
exports.hierarchy = hierarchy;
{
"name": "typedoc-plugin-markdown",
"version": "4.0.0",
"version": "4.0.1",
"description": "A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -15,3 +15,3 @@ # typedoc-plugin-markdown

Please visit the [https://typedoc-plugin-markdown.org/docs](https://typedoc-plugin-markdown.org/docs) for comprehensive documentation, including options and usage guides.
Please visit the [https://typedoc-plugin-markdown.org](https://typedoc-plugin-markdown.org) for comprehensive documentation, including options and usage guides.

@@ -18,0 +18,0 @@ ## License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc