# marked-ast

> Parses Markdown into an abstract syntax tree. Based on github.com/chjj/marked.

Latest version **0.3.0** (published 2016-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install marked-ast
pnpm add marked-ast
yarn add marked-ast
bun add marked-ast
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2016-02-01 |
| First published | 2014-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 48 |
| Author | Patrick Dubroy |
| Maintainers | dubroy |
| Keywords | marked, markdown, ast |

## Links

- npm: https://www.npmjs.com/package/marked-ast
- Repository: https://github.com/pdubroy/marked-ast
- Issues: https://github.com/pdubroy/marked-ast/issues
- npm.io page: https://npm.io/package/marked-ast

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2016-02-01
- 0.2.2 — 2015-05-18
- 0.2.1 — 2015-05-18
- 0.2.0 — 2015-01-03
- 0.1.0 — 2014-08-05

## README

# marked-ast

A modified version of [marked](https://github.com/chjj/marked) that can produce an abstract syntax tree for Markdown.

## Usage

```js
var marked = require('marked-ast');
var ast = marked.parse('_This is **Markdown**_, he said.');
var html = marked.render(ast);
```

The package is just a wrapper for `marked`, so the produced HTML should be identical (if it isn't it's a bug). The AST produced in the example would look like this:

```json
[
  {
    "type": "paragraph",
    "text": [
      {
        "type": "em",
        "text": [
          "This is ",
          {
            "type": "strong",
            "text": [ "Markdown" ]
          }
        ]
      },
      ", he said."
    ]
  }
]
```

## Development

Basic setup:

```bash
git clone https://github.com/pdubroy/marked-ast.git
cd marked-ast
npm install
git submodule update --init
```

### Running Tests

Use `npm test` to run the tests. Before checking code in, run `npm run prepublish`.

### Updating Marked

To update to a new version of marked:

```bash
cd third_party/marked
git checkout <REF>  # E.g., `git checkout v0.3.3`
cd ../..
npm run rewrite && npm test
```

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