
Research
TeamPCP Compromises Telnyx Python SDK to Deliver Credential-Stealing Malware
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.
typedoc-plugin-replace-text
Advanced tools
Plugin for TypeDoc that replaces text in the documentation
This is a plugin for TypeDoc that replaces text in the documentation.
This includes:
You can specify matching patterns and the text they should be replaced with or a replacer function.
This can be useful for:
This module can be installed using npm:
$ npm install --save-dev typedoc-plugin-replace-text
The plugin requires TypeDoc version 0.26.0 or above to be installed. You need to activate the plugin with the plugin option in your TypeDoc config.
After installation TypeDoc can be used normally and you can configure this plugin as described below.
Extend your TypeDoc config file with a new option named replaceText. Here is an example using a JavaScript config file:
/** @type { import('typedoc').TypeDocOptionMap & import('typedoc-plugin-replace-text').Config } */
module.exports = {
out: "output",
entryPointStrategy: "expand",
entryPoints: ["input/module1.ts", "input/module2.ts"],
tsconfig: "tsconfig.json",
readme: "MAIN.md",
plugin: ["typedoc-plugin-replace-text"],
replaceText: {
inCodeCommentText: true,
inCodeCommentTags: true,
inMarkdown: false,
replacements: [
{
pattern: "(GH-(\\d+))",
replace: "[$1](https://github.com/your-name/the-repo/issues/$2)"
},
{
pattern: "King Kong",
flags: "gi",
replace: function (match) {
if (this.sources?.[0].fileName.endsWith("/king-kong.ts")) {
return match + " is home!";
}
return match + " in another file!";
},
},
],
},
};
Explanation:
| Property | Description |
|---|---|
| inCodeCommentText | Specifies if the plugin should replace in the text of comments (not including the text of tags like the description of parameters for a method) in your code. (optional - defaults to true) |
| inCodeCommentTags | Specifies if the plugin should replace in the text of tags (like the description of parameters for a method) in your code comments. (optional - defaults to true) |
| inMarkdown | Specifies if the plugin should replace in all Markdown content parsed by TypeDoc (this includes the main README and all MD files added to the documentation). NOTE: Since version 0.26 TypeDoc parses all code comments as Markdown too. This means that setting this to true will automatically overwrite the other two options above to true. (optional - defaults to true) |
| replacements | The search patterns and texts they should be replaced with. (pattern is the search Regex and flags are the optional Regex flags that default to g. replace can be a string constant or a replacer function that returns the new text for each match. The replacer function also has access to source information through the function context this - see example above where the sources property is an array of TypeDoc SourceReference objects.) |
Please report bugs here. Thanks for your contribution!
If you find this piece of software helpful please consider a donation. Any amount is greatly appreciated and will motivate me to keep this project up to date.
FAQs
Plugin for TypeDoc that replaces text in the documentation
The npm package typedoc-plugin-replace-text receives a total of 4,332 weekly downloads. As such, typedoc-plugin-replace-text popularity was classified as popular.
We found that typedoc-plugin-replace-text demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.

Security News
/Research
Widespread GitHub phishing campaign uses fake Visual Studio Code security alerts in Discussions to trick developers into visiting malicious website.