# @genexus/markdown-parser

> A markdown parser into a syntax tree.

Latest version **0.3.0** (published 2025-06-23) · 0 weekly downloads

## Install

```sh
npm install @genexus/markdown-parser
pnpm add @genexus/markdown-parser
yarn add @genexus/markdown-parser
bun add @genexus/markdown-parser
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; low quality score; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2025-06-23 |
| First published | 2024-02-16 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ggallotti, gerasiz, genexusbuilder, anaberta, dscaffo |

## Links

- npm: https://www.npmjs.com/package/@genexus/markdown-parser
- npm.io page: https://npm.io/package/@genexus/markdown-parser

## Dependencies (6)

- [lowlight](https://npm.io/package/lowlight.md) ^3.1.0
- [mdast-util-gfm](https://npm.io/package/mdast-util-gfm.md) ^3.0.0
- [hast-util-sanitize](https://npm.io/package/hast-util-sanitize.md) ^5.0.1
- [hast-util-from-html](https://npm.io/package/hast-util-from-html.md) ^2.0.1
- [micromark-extension-gfm](https://npm.io/package/micromark-extension-gfm.md) ^3.0.0
- [mdast-util-from-markdown](https://npm.io/package/mdast-util-from-markdown.md) ^2.0.0

## Recent versions

- 0.3.0 (latest) — 2025-06-23
- 0.2.0 — 2025-06-20
- 0.1.1 — 2024-02-16

## README

# GeneXus Markdown Parser

This project provides several methods to parse markdown into a syntax tree. It is written in TypeScript, which allows for static typing and better code organization.

## Installation

To install the dependencies for this project, you can use one of the following package managers: `npm`, `yarn`, or `pnpm`. Choose the one you are most comfortable with and follow the instructions below:

### npm

Run the following command in your terminal:

```bash
npm install @genexus/markdown-parser
```

### yarn

Run the following command in your terminal:

```bash
yarn install @genexus/markdown-parser
```

### pnpm

Run the following command in your terminal:

```bash
pnpm install @genexus/markdown-parser
```

## Exported methods

### `markdownToMdAST: (markdownToParse: string) => Root`

Turn markdown into [mdast](https://github.com/syntax-tree/mdast) using [micromark](https://github.com/micromark/micromark) via [mdast-util-from-markdown](https://github.com/syntax-tree/mdast-util-from-markdown).

This primitive also supports Github Flavored Markdown (GFM) by using [mdast-util-gfm](https://github.com/syntax-tree/mdast-util-gfm) and [micromark-extension-gfm](https://github.com/micromark/micromark-extension-gfm).

### `parseCodeToHAST: (language: string, code: string) => Root`

Turn programming code into [hast](https://github.com/micromark/micromark-extension-gfm) using [lowlight](lowlight).

This primitive also supports all programming languages from [highlight.js](https://github.com/highlightjs/highlight.js). When used at runtime, it will load on demand the programming language needed to parse the code.

---
_Source: https://npm.io/package/@genexus/markdown-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
