
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
wikiparser-node
Advanced tools

WikiParser-Node is an offline Wikitext parser developed by Bhsd for the Node.js environment. It can parse almost all wiki syntax and generate an Abstract Syntax Tree (AST) (Try it online). It also allows for easy querying and modification of the AST, and returns the modified wikitext.
Although WikiParser-Node is not originally designed to convert Wikitext to HTML, it provides a limited capability to do so. Here is a list of example HTML pages rendered using this package.
This version provides a CLI, but only retains the parsing functionality and linting functionality. The parsed AST cannot be modified. It powers the Wikitext LSP, which provides multiple language services for editors such as VS Code, Sublime Text, and Helix.
A list of available linting rules can be found here.
A browser-compatible version, which can be used for code highlighting or as a linting plugin in conjunction with editors such as CodeMirror and Monaco (Usage example). It has been integrated into the MediaWiki official CodeMirror extension since Release 1.45.
Please install the corresponding version as needed (WikiParser-Node or WikiLint), for example:
npm i wikiparser-node
or
npm i wikilint
You can download the code via CDN, for example:
<script src="//cdn.jsdelivr.net/npm/wikiparser-node"></script>
or
<script src="//unpkg.com/wikiparser-node/bundle/bundle-lsp.min.js"></script>
For more browser extensions, please refer to the corresponding documentation.
For MediaWiki sites with the CodeMirror extension installed, such as different language editions of Wikipedia and other Wikimedia Foundation-hosted sites, you can use the following command to obtain the parser configuration:
npx getParserConfig <site> <script path> [user] [force]
# For example:
npx getParserConfig jawiki https://ja.wikipedia.org/w user@example.net
The generated configuration file will be saved in the config directory. You can then use the site name for Parser.config.
// For example:
Parser.config = 'jawiki';
Please refer to the Wiki.
A full database dump (*.xml.bz2) scan of English Wikipedia's ~19 million articles (parsing and linting) on a personal MacBook Air takes about 5 hours.
Token.prototype.toHtml.<indicator> and <ref>.& needs to be escaped in <syntaxhighlight> (Example).{{localurl:}} are not handled correctly (Example).<table> HTML tags (Example).<caption> elements are wrapped in <tbody> elements (Example).<tr> elements should not be fostered (Example).../ on a subpage (Example).<p> wrapping when there are block elements (e.g., <pre>, <div> or even closing tags).FAQs
A Node.js parser for MediaWiki markup with AST
The npm package wikiparser-node receives a total of 558 weekly downloads. As such, wikiparser-node popularity was classified as not popular.
We found that wikiparser-node 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

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