# swig-marked

> Markdown filters and tags for swigs, backed by marked

Latest version **0.0.1** (published 2014-02-14) · GPL license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-02-14 |
| First published | 2014-02-14 |
| Weekly downloads | 0 |
| License | GPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Matthijs van Henten |
| Maintainers | mvhenten |
| Keywords | swig, markdown, marked, tags, filters, template |

## Links

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

## Dependencies (1)

- [marked](https://npm.io/package/marked.md) ~0.3.1

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2014-02-14

## README

swig-marked
===========

Markdown filter and tag based on marked. As the name already states, this module combines
[swig](https://github.com/paularmstrong/swig/) and [marked](https://github.com/chjj/marked).

There is already a markdown filter/tag in the package `swig-extras`, however, that one uses
[markdown](https://github.com/evilstreak/markdown-js), and I wanted to have `marked` for it's
support for tables and GFM.


usage:

```javascript
    var markedSwig = require('swig-marked'),
        swig = require('swig');


    markedSwig.useFilter( swig );
    markedSwig.useTag( swig );

    swig.render( '{% marked %}# hello world{% endmarked %}' );

    // <h1 id="hello-word">hello world</h1>


    swig.render('{{ words|marked }}', { locals: { words: '# hello word' } });

    // <h1 id="hello-world">hello world</h1>

    // filter and tag are also exposed like so:
    swig.setFilter( 'dingus', markedSwig.filter);
    swig.render('{{ words|dingus }}', { locals: { words: '# hello word' } });

    // <h1 id="hello-world">hello world</h1>

    // provide configuration options to marked:
    var configured = markedSwig.configure({
        gfm: false, // no more gfm :(
    });

```

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